diff options
author | r <r@freesoftwareextremist.com> | 2019-12-14 20:19:02 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2019-12-14 20:19:02 +0000 |
commit | e129ea922e6cbe8966f9a9f0b1c6c94401516c61 (patch) | |
tree | 35be3bc003b787db5898ac1ba8aacca3f944105e /service/logging.go | |
parent | ea66bd539dec12ef2846c23e505593f9f9d9fac3 (diff) | |
download | bloat-e129ea922e6cbe8966f9a9f0b1c6c94401516c61.tar.gz bloat-e129ea922e6cbe8966f9a9f0b1c6c94401516c61.zip |
Add attachments support
Diffstat (limited to 'service/logging.go')
-rw-r--r-- | service/logging.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/service/logging.go b/service/logging.go index 0ed40bd..3a95a94 100644 --- a/service/logging.go +++ b/service/logging.go @@ -5,6 +5,7 @@ import ( "io" "log" "mastodon" + "mime/multipart" "time" ) @@ -108,10 +109,10 @@ func (s *loggingService) UnRetweet(ctx context.Context, client io.Writer, c *mas return s.Service.UnRetweet(ctx, client, c, id) } -func (s *loggingService) PostTweet(ctx context.Context, client io.Writer, c *mastodon.Client, content string, replyToID string) (id string, err error) { +func (s *loggingService) PostTweet(ctx context.Context, client io.Writer, c *mastodon.Client, content string, replyToID string, files []*multipart.FileHeader) (id string, err error) { defer func(begin time.Time) { s.logger.Printf("method=%v, content=%v, reply_to_id=%v, took=%v, err=%v\n", "PostTweet", content, replyToID, time.Since(begin), err) }(time.Now()) - return s.Service.PostTweet(ctx, client, c, content, replyToID) + return s.Service.PostTweet(ctx, client, c, content, replyToID, files) } |