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 --- service/service.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'service/service.go') diff --git a/service/service.go b/service/service.go index d88273f..2275dfb 100644 --- a/service/service.go +++ b/service/service.go @@ -922,7 +922,7 @@ func (s *service) Signout(c *client) (err error) { } func (s *service) Post(c *client, content string, replyToID string, - format string, visibility string, isNSFW bool, + format string, visibility string, isNSFW bool, isQuote bool, files []*multipart.FileHeader) (id string, err error) { var mediaIDs []string @@ -934,9 +934,16 @@ func (s *service) Post(c *client, content string, replyToID string, mediaIDs = append(mediaIDs, a.ID) } + var quoteID string + if isQuote { + quoteID = replyToID + replyToID = "" + } + tweet := &mastodon.Toot{ Status: content, InReplyToID: replyToID, + QuoteID: quoteID, MediaIDs: mediaIDs, ContentType: format, Visibility: visibility, -- cgit v1.2.3