diff options
author | r <r@freesoftwareextremist.com> | 2022-01-27 12:05:15 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2022-01-27 12:05:15 +0000 |
commit | b8c0133bcd5e7f1d4063ad992949cc19d18e7aad (patch) | |
tree | 5322b83d194c9ffcb498627bdd16175f9508d87d /mastodon/accounts.go | |
parent | 54c42455f393c5ae8ebdb19884d40ebd9a18f755 (diff) | |
parent | 4ef5e0daf285f41850c9ac53b0322d85fbf5eaec (diff) | |
download | bloat-b8c0133bcd5e7f1d4063ad992949cc19d18e7aad.tar.gz bloat-b8c0133bcd5e7f1d4063ad992949cc19d18e7aad.zip |
Merge branch 'master' into absolute_fluoride
Diffstat (limited to 'mastodon/accounts.go')
-rw-r--r-- | mastodon/accounts.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mastodon/accounts.go b/mastodon/accounts.go index 694e672..df0a3b7 100644 --- a/mastodon/accounts.go +++ b/mastodon/accounts.go @@ -243,9 +243,13 @@ func (c *Client) AccountUnblock(ctx context.Context, id string) (*Relationship, } // AccountMute mute the account. -func (c *Client) AccountMute(ctx context.Context, id string) (*Relationship, error) { +func (c *Client) AccountMute(ctx context.Context, id string, notifications *bool) (*Relationship, error) { + params := url.Values{} + if notifications != nil { + params.Set("notifications", strconv.FormatBool(*notifications)) + } var relationship Relationship - err := c.doAPI(ctx, http.MethodPost, fmt.Sprintf("/api/v1/accounts/%s/mute", url.PathEscape(string(id))), nil, &relationship, nil) + err := c.doAPI(ctx, http.MethodPost, fmt.Sprintf("/api/v1/accounts/%s/mute", url.PathEscape(string(id))), params, &relationship, nil) if err != nil { return nil, err } |