aboutsummaryrefslogtreecommitdiff
path: root/mastodon
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/accounts.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/mastodon/accounts.go b/mastodon/accounts.go
index 540adb2..f4e9002 100644
--- a/mastodon/accounts.go
+++ b/mastodon/accounts.go
@@ -246,11 +246,10 @@ func (c *Client) AccountUnblock(ctx context.Context, id string) (*Relationship,
}
// AccountMute mute the account.
-func (c *Client) AccountMute(ctx context.Context, id string, notifications *bool) (*Relationship, error) {
+func (c *Client) AccountMute(ctx context.Context, id string, notifications bool, duration int) (*Relationship, error) {
params := url.Values{}
- if notifications != nil {
- params.Set("notifications", strconv.FormatBool(*notifications))
- }
+ params.Set("notifications", strconv.FormatBool(notifications))
+ params.Set("duration", strconv.Itoa(duration))
var relationship Relationship
err := c.doAPI(ctx, http.MethodPost, fmt.Sprintf("/api/v1/accounts/%s/mute", url.PathEscape(string(id))), params, &relationship, nil)
if err != nil {