diff options
author | r <r@freesoftwareextremist.com> | 2021-12-13 13:58:15 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2021-12-13 13:58:15 +0000 |
commit | db29c3d87404677c9c02f62097d8a0307cd8d5da (patch) | |
tree | d0dc0d24b67edb26521c6dfa0f1b453868255d0f /mastodon | |
parent | 1c8c661abb4beda77edefe421fba1a52cf933956 (diff) | |
download | bloat-db29c3d87404677c9c02f62097d8a0307cd8d5da.tar.gz bloat-db29c3d87404677c9c02f62097d8a0307cd8d5da.zip |
Add an option to hide unsupported notifications
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/notification.go | 5 |
1 files changed, 4 insertions, 1 deletions
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) } |