diff options
author | 2021-08-25 15:34:33 +0200 | |
---|---|---|
committer | 2021-08-25 15:34:33 +0200 | |
commit | 2dc9fc1626507bb54417fc4a1920b847cafb27a2 (patch) | |
tree | 4ddeac479b923db38090aac8bd9209f3646851c1 /internal/processing/notification.go | |
parent | Manually approves followers (#146) (diff) | |
download | gotosocial-2dc9fc1626507bb54417fc4a1920b847cafb27a2.tar.xz |
Pg to bun (#148)
* start moving to bun
* changing more stuff
* more
* and yet more
* tests passing
* seems stable now
* more big changes
* small fix
* little fixes
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 |