diff options
Diffstat (limited to 'mastodon/accounts.go')
-rw-r--r-- | mastodon/accounts.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mastodon/accounts.go b/mastodon/accounts.go index 694e672..dbd0a48 100644 --- a/mastodon/accounts.go +++ b/mastodon/accounts.go @@ -189,6 +189,7 @@ type Relationship struct { Following bool `json:"following"` FollowedBy bool `json:"followed_by"` Blocking bool `json:"blocking"` + BlockedBy bool `json:"blocked_by"` Muting bool `json:"muting"` MutingNotifications bool `json:"muting_notifications"` Subscribing bool `json:"subscribing"` @@ -243,9 +244,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 } |