From e5bf3159b8e485c108de0e4b1051ba6b66c16099 Mon Sep 17 00:00:00 2001 From: r Date: Mon, 14 Oct 2024 07:54:41 +0000 Subject: Add support for quote reply --- mastodon/mastodon.go | 1 + mastodon/status.go | 3 +++ 2 files changed, 4 insertions(+) (limited to 'mastodon') diff --git a/mastodon/mastodon.go b/mastodon/mastodon.go index 194ca30..ca2089c 100644 --- a/mastodon/mastodon.go +++ b/mastodon/mastodon.go @@ -198,6 +198,7 @@ type Toot struct { SpoilerText string `json:"spoiler_text"` Visibility string `json:"visibility"` ContentType string `json:"content_type"` + QuoteID string `json:"quote_id"` } // Mention hold information for mention. diff --git a/mastodon/status.go b/mastodon/status.go index d009a7f..34f8727 100644 --- a/mastodon/status.go +++ b/mastodon/status.go @@ -264,6 +264,9 @@ func (c *Client) PostStatus(ctx context.Context, toot *Toot) (*Status, error) { if toot.ContentType != "" { params.Set("content_type", toot.ContentType) } + if toot.QuoteID != "" { + params.Set("quote_id", toot.QuoteID) + } var status Status err := c.doAPI(ctx, http.MethodPost, "/api/v1/statuses", params, &status, nil) -- cgit v1.2.3