aboutsummaryrefslogtreecommitdiff
path: root/mastodon
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2024-10-14 07:54:41 +0000
committerr <r@freesoftwareextremist.com>2024-10-14 07:54:41 +0000
commite5bf3159b8e485c108de0e4b1051ba6b66c16099 (patch)
tree858e645fb47e241c2b4737df31703adeafa09dbf /mastodon
parent14d5eaf6e9aa3c74049a54a3ef95e71158fd4942 (diff)
downloadbloat-e5bf3159b8e485c108de0e4b1051ba6b66c16099.tar.gz
bloat-e5bf3159b8e485c108de0e4b1051ba6b66c16099.zip
Add support for quote reply
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/mastodon.go1
-rw-r--r--mastodon/status.go3
2 files changed, 4 insertions, 0 deletions
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)