aboutsummaryrefslogtreecommitdiff
path: root/service/service.go
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2019-12-22 16:27:49 +0000
committerr <r@freesoftwareextremist.com>2019-12-22 16:27:49 +0000
commit05daa6a148ee4d5d43ab1f055862b6a4b2eb75ec (patch)
tree0e82031aec5432ca06b5aefeb2151a27757f6312 /service/service.go
parent2506615f4228de4189202123d414e8f22b2c1c1b (diff)
downloadbloat-05daa6a148ee4d5d43ab1f055862b6a4b2eb75ec.tar.gz
bloat-05daa6a148ee4d5d43ab1f055862b6a4b2eb75ec.zip
Add nsfw checkbox for posts
Diffstat (limited to 'service/service.go')
-rw-r--r--service/service.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/service/service.go b/service/service.go
index 07a026a..ad47408 100644
--- a/service/service.go
+++ b/service/service.go
@@ -38,7 +38,7 @@ type Service interface {
UnLike(ctx context.Context, client io.Writer, c *model.Client, id string) (err error)
Retweet(ctx context.Context, client io.Writer, c *model.Client, id string) (err error)
UnRetweet(ctx context.Context, client io.Writer, c *model.Client, id string) (err error)
- PostTweet(ctx context.Context, client io.Writer, c *model.Client, content string, replyToID string, visibility string, files []*multipart.FileHeader) (id string, err error)
+ PostTweet(ctx context.Context, client io.Writer, c *model.Client, content string, replyToID string, visibility string, isNSFW bool, files []*multipart.FileHeader) (id string, err error)
Follow(ctx context.Context, client io.Writer, c *model.Client, id string) (err error)
UnFollow(ctx context.Context, client io.Writer, c *model.Client, id string) (err error)
}
@@ -482,7 +482,7 @@ func (svc *service) UnRetweet(ctx context.Context, client io.Writer, c *model.Cl
return
}
-func (svc *service) PostTweet(ctx context.Context, client io.Writer, c *model.Client, content string, replyToID string, visibility string, files []*multipart.FileHeader) (id string, err error) {
+func (svc *service) PostTweet(ctx context.Context, client io.Writer, c *model.Client, content string, replyToID string, visibility string, isNSFW bool, files []*multipart.FileHeader) (id string, err error) {
var mediaIds []string
for _, f := range files {
a, err := c.UploadMediaFromMultipartFileHeader(ctx, f)
@@ -503,6 +503,7 @@ func (svc *service) PostTweet(ctx context.Context, client io.Writer, c *model.Cl
InReplyToID: replyToID,
MediaIDs: mediaIds,
Visibility: visibility,
+ Sensitive: isNSFW,
}
s, err := c.PostStatus(ctx, tweet)