summaryrefslogtreecommitdiff
path: root/internal/processing
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing')
-rw-r--r--internal/processing/notification.go4
-rw-r--r--internal/processing/notification_test.go2
-rw-r--r--internal/processing/processor.go2
3 files changed, 4 insertions, 4 deletions
diff --git a/internal/processing/notification.go b/internal/processing/notification.go
index 66b967afa..fd2651d4a 100644
--- a/internal/processing/notification.go
+++ b/internal/processing/notification.go
@@ -29,8 +29,8 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/util"
)
-func (p *processor) NotificationsGet(ctx context.Context, authed *oauth.Auth, limit int, maxID string, sinceID string) (*apimodel.TimelineResponse, gtserror.WithCode) {
- notifs, err := p.db.GetNotifications(ctx, authed.Account.ID, limit, maxID, sinceID)
+func (p *processor) NotificationsGet(ctx context.Context, authed *oauth.Auth, excludeTypes []string, limit int, maxID string, sinceID string) (*apimodel.TimelineResponse, gtserror.WithCode) {
+ notifs, err := p.db.GetNotifications(ctx, authed.Account.ID, excludeTypes, limit, maxID, sinceID)
if err != nil {
return nil, gtserror.NewErrorInternalError(err)
}
diff --git a/internal/processing/notification_test.go b/internal/processing/notification_test.go
index 6ecca92a9..9758ea1a0 100644
--- a/internal/processing/notification_test.go
+++ b/internal/processing/notification_test.go
@@ -33,7 +33,7 @@ type NotificationTestSuite struct {
// get a notification where someone has liked our status
func (suite *NotificationTestSuite) TestGetNotifications() {
receivingAccount := suite.testAccounts["local_account_1"]
- notifsResponse, err := suite.processor.NotificationsGet(context.Background(), suite.testAutheds["local_account_1"], 10, "", "")
+ notifsResponse, err := suite.processor.NotificationsGet(context.Background(), suite.testAutheds["local_account_1"], []string{}, 10, "", "")
suite.NoError(err)
suite.Len(notifsResponse.Items, 1)
notif, ok := notifsResponse.Items[0].(*apimodel.Notification)
diff --git a/internal/processing/processor.go b/internal/processing/processor.go
index a6e47bed8..463ff72b5 100644
--- a/internal/processing/processor.go
+++ b/internal/processing/processor.go
@@ -154,7 +154,7 @@ type Processor interface {
MediaUpdate(ctx context.Context, authed *oauth.Auth, attachmentID string, form *apimodel.AttachmentUpdateRequest) (*apimodel.Attachment, gtserror.WithCode)
// NotificationsGet
- NotificationsGet(ctx context.Context, authed *oauth.Auth, limit int, maxID string, sinceID string) (*apimodel.TimelineResponse, gtserror.WithCode)
+ NotificationsGet(ctx context.Context, authed *oauth.Auth, excludeTypes []string, limit int, maxID string, sinceID string) (*apimodel.TimelineResponse, gtserror.WithCode)
// NotificationsClear
NotificationsClear(ctx context.Context, authed *oauth.Auth) gtserror.WithCode