diff options
author | 2023-04-10 21:56:02 +0200 | |
---|---|---|
committer | 2023-04-10 20:56:02 +0100 | |
commit | 093cf2ab12a1f6bfa9629917101afffd2aeb8376 (patch) | |
tree | c0897a610b884cdf8e9b9d88b01c1e062a45f1a3 /internal/processing/fromfederator.go | |
parent | [chore]: Bump golang.org/x/oauth2 from 0.6.0 to 0.7.0 (#1684) (diff) | |
download | gotosocial-093cf2ab12a1f6bfa9629917101afffd2aeb8376.tar.xz |
[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
Diffstat (limited to 'internal/processing/fromfederator.go')
-rw-r--r-- | internal/processing/fromfederator.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/internal/processing/fromfederator.go b/internal/processing/fromfederator.go index 32a970114..55e85a526 100644 --- a/internal/processing/fromfederator.go +++ b/internal/processing/fromfederator.go @@ -164,11 +164,7 @@ func (p *Processor) processCreateStatusFromFederator(ctx context.Context, federa status.Account = a } - 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 } @@ -327,7 +323,7 @@ func (p *Processor) processCreateAnnounceFromFederator(ctx context.Context, fede return fmt.Errorf("error adding dereferenced announce to the db: %s", err) } - if err := p.timelineStatus(ctx, incomingAnnounce); err != nil { + if err := p.timelineAndNotifyStatus(ctx, incomingAnnounce); err != nil { return err } @@ -367,7 +363,7 @@ func (p *Processor) processCreateFlagFromFederator(ctx context.Context, federato // TODO: handle additional side effects of flag creation: // - notify admins by dm / notification - return p.notifyReport(ctx, incomingReport) + return p.emailReport(ctx, incomingReport) } // processUpdateAccountFromFederator handles Activity Update and Object Profile |