diff options
Diffstat (limited to 'internal/processing')
-rw-r--r-- | internal/processing/timeline/notification.go | 22 | ||||
-rw-r--r-- | internal/processing/workers/surfacenotify_test.go | 2 |
2 files changed, 21 insertions, 3 deletions
diff --git a/internal/processing/timeline/notification.go b/internal/processing/timeline/notification.go index 5156a1cdf..697649444 100644 --- a/internal/processing/timeline/notification.go +++ b/internal/processing/timeline/notification.go @@ -34,8 +34,26 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/util" ) -func (p *Processor) NotificationsGet(ctx context.Context, authed *oauth.Auth, maxID string, sinceID string, minID string, limit int, excludeTypes []string) (*apimodel.PageableResponse, gtserror.WithCode) { - notifs, err := p.state.DB.GetAccountNotifications(ctx, authed.Account.ID, maxID, sinceID, minID, limit, excludeTypes) +func (p *Processor) NotificationsGet( + ctx context.Context, + authed *oauth.Auth, + maxID string, + sinceID string, + minID string, + limit int, + includeTypes []string, + excludeTypes []string, +) (*apimodel.PageableResponse, gtserror.WithCode) { + notifs, err := p.state.DB.GetAccountNotifications( + ctx, + authed.Account.ID, + maxID, + sinceID, + minID, + limit, + includeTypes, + excludeTypes, + ) if err != nil && !errors.Is(err, db.ErrNoEntries) { err = fmt.Errorf("NotificationsGet: db error getting notifications: %w", err) return nil, gtserror.NewErrorInternalError(err) diff --git a/internal/processing/workers/surfacenotify_test.go b/internal/processing/workers/surfacenotify_test.go index 7b448781d..18d0277ae 100644 --- a/internal/processing/workers/surfacenotify_test.go +++ b/internal/processing/workers/surfacenotify_test.go @@ -87,7 +87,7 @@ func (suite *SurfaceNotifyTestSuite) TestSpamNotifs() { notifs, err := testStructs.State.DB.GetAccountNotifications( gtscontext.SetBarebones(ctx), targetAccount.ID, - "", "", "", 0, nil, + "", "", "", 0, nil, nil, ) if err != nil { suite.FailNow(err.Error()) |