mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:02:26 -05:00
[feature] Receive notification when followed account posts (if desired) (#1680)
* start working on notifs for new posts * tidy up a bit * update swagger * carry over show reblogs + notify from follow req * test notify on status post * update column slice * dedupe update logic + add tests * fix own boosts not being timelined * avoid type check, passing unnecessary accounts * remove unnecessary 'inReplyToID' check * add a couple todo's for future db functions
This commit is contained in:
parent
c01d2f9b44
commit
093cf2ab12
17 changed files with 788 additions and 448 deletions
|
|
@ -160,11 +160,7 @@ func (p *Processor) processCreateStatusFromClientAPI(ctx context.Context, client
|
|||
return errors.New("note was not parseable as *gtsmodel.Status")
|
||||
}
|
||||
|
||||
if err := p.timelineStatus(ctx, status); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := p.notifyStatus(ctx, status); err != nil {
|
||||
if err := p.timelineAndNotifyStatus(ctx, status); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
@ -203,7 +199,7 @@ func (p *Processor) processCreateAnnounceFromClientAPI(ctx context.Context, clie
|
|||
return errors.New("boost was not parseable as *gtsmodel.Status")
|
||||
}
|
||||
|
||||
if err := p.timelineStatus(ctx, boostWrapperStatus); err != nil {
|
||||
if err := p.timelineAndNotifyStatus(ctx, boostWrapperStatus); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
@ -255,7 +251,7 @@ func (p *Processor) processUpdateReportFromClientAPI(ctx context.Context, client
|
|||
return nil
|
||||
}
|
||||
|
||||
return p.notifyReportClosed(ctx, report)
|
||||
return p.emailReportClosed(ctx, report)
|
||||
}
|
||||
|
||||
func (p *Processor) processAcceptFollowFromClientAPI(ctx context.Context, clientMsg messages.FromClientAPI) error {
|
||||
|
|
@ -373,7 +369,7 @@ func (p *Processor) processReportAccountFromClientAPI(ctx context.Context, clien
|
|||
}
|
||||
}
|
||||
|
||||
if err := p.notifyReport(ctx, report); err != nil {
|
||||
if err := p.emailReport(ctx, report); err != nil {
|
||||
return fmt.Errorf("processReportAccountFromClientAPI: error notifying report: %w", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue