From 093cf2ab12a1f6bfa9629917101afffd2aeb8376 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 10 Apr 2023 21:56:02 +0200 Subject: [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 --- internal/processing/fromfederator.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'internal/processing/fromfederator.go') 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 -- cgit v1.2.3