diff options
author | 2024-06-17 12:50:50 -0700 | |
---|---|---|
committer | 2024-06-17 20:50:50 +0100 | |
commit | b08c1bd0cbf6986e59247deefbabb150db83aadd (patch) | |
tree | 45d47345c2cf46ddf50533be16470edd17a1da2a /internal/db/notification.go | |
parent | [chore]: Bump github.com/spf13/cobra from 1.8.0 to 1.8.1 (#3016) (diff) | |
download | gotosocial-b08c1bd0cbf6986e59247deefbabb150db83aadd.tar.xz |
[feature] Implement types[] param for notifications (#3009)
Counterpart of exclude_types[].
Also updates Swagger spec for types[] to use the correct param name and enumerate possible values.
Fixes #3003
Diffstat (limited to 'internal/db/notification.go')
-rw-r--r-- | internal/db/notification.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/db/notification.go b/internal/db/notification.go index 9ff459b9c..2e8f5ed1f 100644 --- a/internal/db/notification.go +++ b/internal/db/notification.go @@ -25,12 +25,13 @@ import ( // Notification contains functions for creating and getting notifications. type Notification interface { - // GetNotifications returns a slice of notifications that pertain to the given accountID. + // 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). - GetAccountNotifications(ctx context.Context, accountID string, maxID string, sinceID string, minID string, limit int, excludeTypes []string) ([]*gtsmodel.Notification, error) + // 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) - // GetNotification returns one notification according to its id. + // GetNotificationByID returns one notification according to its id. GetNotificationByID(ctx context.Context, id string) (*gtsmodel.Notification, error) // GetNotificationsByIDs returns a slice of notifications of the the provided IDs. |