From 05daa6a148ee4d5d43ab1f055862b6a4b2eb75ec Mon Sep 17 00:00:00 2001 From: r Date: Sun, 22 Dec 2019 16:27:49 +0000 Subject: Add nsfw checkbox for posts --- service/transport.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'service/transport.go') 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 -- cgit v1.2.3