diff options
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/mastodon.go | 1 | ||||
-rw-r--r-- | mastodon/status.go | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/mastodon/mastodon.go b/mastodon/mastodon.go index 22f5a53..8a8af6a 100644 --- a/mastodon/mastodon.go +++ b/mastodon/mastodon.go @@ -273,6 +273,7 @@ type Toot struct { Sensitive bool `json:"sensitive"` SpoilerText string `json:"spoiler_text"` Visibility string `json:"visibility"` + ContentType string `json:"content_type"` } // Mention hold information for mention. diff --git a/mastodon/status.go b/mastodon/status.go index c36b6cb..edd88e9 100644 --- a/mastodon/status.go +++ b/mastodon/status.go @@ -266,6 +266,9 @@ func (c *Client) PostStatus(ctx context.Context, toot *Toot) (*Status, error) { if toot.SpoilerText != "" { params.Set("spoiler_text", toot.SpoilerText) } + if toot.ContentType != "" { + params.Set("content_type", toot.ContentType) + } var status Status err := c.doAPI(ctx, http.MethodPost, "/api/v1/statuses", params, &status, nil) |