diff options
Diffstat (limited to 'internal/processing/notification.go')
-rw-r--r-- | internal/processing/notification.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/processing/notification.go b/internal/processing/notification.go index 7af74b04f..f91d2f2cd 100644 --- a/internal/processing/notification.go +++ b/internal/processing/notification.go @@ -19,22 +19,24 @@ package processing import ( + "context" + apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model" "github.com/superseriousbusiness/gotosocial/internal/gtserror" "github.com/superseriousbusiness/gotosocial/internal/oauth" ) -func (p *processor) NotificationsGet(authed *oauth.Auth, limit int, maxID string, sinceID string) ([]*apimodel.Notification, gtserror.WithCode) { +func (p *processor) NotificationsGet(ctx context.Context, authed *oauth.Auth, limit int, maxID string, sinceID string) ([]*apimodel.Notification, gtserror.WithCode) { l := p.log.WithField("func", "NotificationsGet") - notifs, err := p.db.GetNotifications(authed.Account.ID, limit, maxID, sinceID) + notifs, err := p.db.GetNotifications(ctx, authed.Account.ID, limit, maxID, sinceID) if err != nil { return nil, gtserror.NewErrorInternalError(err) } mastoNotifs := []*apimodel.Notification{} for _, n := range notifs { - mastoNotif, err := p.tc.NotificationToMasto(n) + mastoNotif, err := p.tc.NotificationToMasto(ctx, n) if err != nil { l.Debugf("got an error converting a notification to masto, will skip it: %s", err) continue |