diff options
Diffstat (limited to 'internal/db')
-rw-r--r-- | internal/db/bundb/notification.go | 6 | ||||
-rw-r--r-- | internal/db/notification.go | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/internal/db/bundb/notification.go b/internal/db/bundb/notification.go index af147ab08..d5a96dd2d 100644 --- a/internal/db/bundb/notification.go +++ b/internal/db/bundb/notification.go @@ -200,7 +200,7 @@ func (n *notificationDB) GetAccountNotifications( sinceID string, minID string, limit int, - includeTypes []string, + types []string, excludeTypes []string, ) ([]*gtsmodel.Notification, error) { // Ensure reasonable @@ -238,9 +238,9 @@ func (n *notificationDB) GetAccountNotifications( frontToBack = false // page up } - if len(includeTypes) > 0 { + if len(types) > 0 { // Include only requested notification types. - q = q.Where("? IN (?)", bun.Ident("notification.notification_type"), bun.In(includeTypes)) + q = q.Where("? IN (?)", bun.Ident("notification.notification_type"), bun.In(types)) } if len(excludeTypes) > 0 { diff --git a/internal/db/notification.go b/internal/db/notification.go index 2e8f5ed1f..deb58835a 100644 --- a/internal/db/notification.go +++ b/internal/db/notification.go @@ -28,8 +28,8 @@ type Notification interface { // GetAccountNotifications returns a slice of notifications that pertain to the given accountID. // // Returned notifications will be ordered ID descending (ie., highest/newest to lowest/oldest). - // If includeTypes is empty, *all* notification types will be included. - GetAccountNotifications(ctx context.Context, accountID string, maxID string, sinceID string, minID string, limit int, includeTypes []string, excludeTypes []string) ([]*gtsmodel.Notification, error) + // If types is empty, *all* notification types will be included. + GetAccountNotifications(ctx context.Context, accountID string, maxID string, sinceID string, minID string, limit int, types []string, excludeTypes []string) ([]*gtsmodel.Notification, error) // GetNotificationByID returns one notification according to its id. GetNotificationByID(ctx context.Context, id string) (*gtsmodel.Notification, error) |