summaryrefslogtreecommitdiff
path: root/internal/processing/fromclientapi.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-04-10 21:56:02 +0200
committerLibravatar GitHub <noreply@github.com>2023-04-10 20:56:02 +0100
commit093cf2ab12a1f6bfa9629917101afffd2aeb8376 (patch)
treec0897a610b884cdf8e9b9d88b01c1e062a45f1a3 /internal/processing/fromclientapi.go
parent[chore]: Bump golang.org/x/oauth2 from 0.6.0 to 0.7.0 (#1684) (diff)
downloadgotosocial-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/fromclientapi.go')
-rw-r--r--internal/processing/fromclientapi.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/internal/processing/fromclientapi.go b/internal/processing/fromclientapi.go
index 490fc7d34..082a5ba2e 100644
--- a/internal/processing/fromclientapi.go
+++ b/internal/processing/fromclientapi.go
@@ -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)
}