From e129ea922e6cbe8966f9a9f0b1c6c94401516c61 Mon Sep 17 00:00:00 2001 From: r Date: Sat, 14 Dec 2019 20:19:02 +0000 Subject: Add attachments support --- service/auth.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'service/auth.go') diff --git a/service/auth.go b/service/auth.go index 5ee2001..98012af 100644 --- a/service/auth.go +++ b/service/auth.go @@ -5,6 +5,7 @@ import ( "errors" "io" "mastodon" + "mime/multipart" "web/model" ) @@ -142,10 +143,10 @@ func (s *authService) UnRetweet(ctx context.Context, client io.Writer, c *mastod return s.Service.UnRetweet(ctx, client, c, id) } -func (s *authService) PostTweet(ctx context.Context, client io.Writer, c *mastodon.Client, content string, replyToID string) (id string, err error) { +func (s *authService) PostTweet(ctx context.Context, client io.Writer, c *mastodon.Client, content string, replyToID string, files []*multipart.FileHeader) (id string, err error) { c, err = s.getClient(ctx) if err != nil { return } - return s.Service.PostTweet(ctx, client, c, content, replyToID) + return s.Service.PostTweet(ctx, client, c, content, replyToID, files) } -- cgit v1.2.3