aboutsummaryrefslogtreecommitdiff
path: root/mastodon
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2021-12-13 13:58:15 +0000
committerr <r@freesoftwareextremist.com>2021-12-13 13:58:15 +0000
commitdb29c3d87404677c9c02f62097d8a0307cd8d5da (patch)
treed0dc0d24b67edb26521c6dfa0f1b453868255d0f /mastodon
parent1c8c661abb4beda77edefe421fba1a52cf933956 (diff)
downloadbloat-db29c3d87404677c9c02f62097d8a0307cd8d5da.tar.gz
bloat-db29c3d87404677c9c02f62097d8a0307cd8d5da.zip
Add an option to hide unsupported notifications
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/notification.go5
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)
}