mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-09 21:38:45 +00:00
Add nsfw checkbox for posts
This commit is contained in:
parent
2506615f42
commit
05daa6a148
7 changed files with 42 additions and 20 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue