aboutsummaryrefslogtreecommitdiff
path: root/mastodon/lists.go
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2022-02-11 11:18:02 +0000
committerr <r@freesoftwareextremist.com>2022-02-11 11:49:23 +0000
commitc390a0c32720f6afe852bc7a3a3f64c3afe9e401 (patch)
tree57ac4a30f8fe45edf0369eaa4c5609ffb74315eb /mastodon/lists.go
parentc2f237e9019a4fb31cd7d969bf59670c144592c8 (diff)
downloadbloat-c390a0c32720f6afe852bc7a3a3f64c3afe9e401.tar.gz
bloat-c390a0c32720f6afe852bc7a3a3f64c3afe9e401.zip
Add lists
Diffstat (limited to 'mastodon/lists.go')
-rw-r--r--mastodon/lists.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/mastodon/lists.go b/mastodon/lists.go
index d323b79..1b76bdc 100644
--- a/mastodon/lists.go
+++ b/mastodon/lists.go
@@ -90,7 +90,7 @@ func (c *Client) DeleteList(ctx context.Context, id string) error {
func (c *Client) AddToList(ctx context.Context, list string, accounts ...string) error {
params := url.Values{}
for _, acct := range accounts {
- params.Add("account_ids", string(acct))
+ params.Add("account_ids[]", string(acct))
}
return c.doAPI(ctx, http.MethodPost, fmt.Sprintf("/api/v1/lists/%s/accounts", url.PathEscape(string(list))), params, nil, nil)
@@ -100,7 +100,7 @@ func (c *Client) AddToList(ctx context.Context, list string, accounts ...string)
func (c *Client) RemoveFromList(ctx context.Context, list string, accounts ...string) error {
params := url.Values{}
for _, acct := range accounts {
- params.Add("account_ids", string(acct))
+ params.Add("account_ids[]", string(acct))
}
return c.doAPI(ctx, http.MethodDelete, fmt.Sprintf("/api/v1/lists/%s/accounts", url.PathEscape(string(list))), params, nil, nil)