diff options
author | r <r@freesoftwareextremist.com> | 2019-12-22 16:27:49 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2019-12-22 16:27:49 +0000 |
commit | 05daa6a148ee4d5d43ab1f055862b6a4b2eb75ec (patch) | |
tree | 0e82031aec5432ca06b5aefeb2151a27757f6312 /service/transport.go | |
parent | 2506615f4228de4189202123d414e8f22b2c1c1b (diff) | |
download | bloat-05daa6a148ee4d5d43ab1f055862b6a4b2eb75ec.tar.gz bloat-05daa6a148ee4d5d43ab1f055862b6a4b2eb75ec.zip |
Add nsfw checkbox for posts
Diffstat (limited to 'service/transport.go')
-rw-r--r-- | service/transport.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/service/transport.go b/service/transport.go index 4e852f2..e3ec113 100644 --- a/service/transport.go +++ b/service/transport.go @@ -156,9 +156,11 @@ func NewHandler(s Service, staticDir string) http.Handler { content := getMultipartFormValue(req.MultipartForm, "content") replyToID := getMultipartFormValue(req.MultipartForm, "reply_to_id") visibility := getMultipartFormValue(req.MultipartForm, "visibility") + isNSFW := "on" == getMultipartFormValue(req.MultipartForm, "is_nsfw") + files := req.MultipartForm.File["attachments"] - id, err := s.PostTweet(ctx, w, nil, content, replyToID, visibility, files) + id, err := s.PostTweet(ctx, w, nil, content, replyToID, visibility, isNSFW, files) if err != nil { s.ServeErrorPage(ctx, w, err) return |