aboutsummaryrefslogtreecommitdiff
path: root/service/transport.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/transport.go')
-rw-r--r--service/transport.go4
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