From db29c3d87404677c9c02f62097d8a0307cd8d5da Mon Sep 17 00:00:00 2001 From: r Date: Mon, 13 Dec 2021 13:58:15 +0000 Subject: Add an option to hide unsupported notifications --- mastodon/notification.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mastodon') diff --git a/mastodon/notification.go b/mastodon/notification.go index 656e6a1..e94f901 100644 --- a/mastodon/notification.go +++ b/mastodon/notification.go @@ -23,9 +23,12 @@ type Notification struct { } // GetNotifications return notifications. -func (c *Client) GetNotifications(ctx context.Context, pg *Pagination, excludes []string) ([]*Notification, error) { +func (c *Client) GetNotifications(ctx context.Context, pg *Pagination, includes, excludes []string) ([]*Notification, error) { var notifications []*Notification params := url.Values{} + for _, include := range includes { + params.Add("include_types[]", include) + } for _, exclude := range excludes { params.Add("exclude_types[]", exclude) } -- cgit v1.2.3