about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorkedama <kedama@foresdon.jp>2022-11-28 04:36:21 +0900
committerGitHub <noreply@github.com>2022-11-27 20:36:21 +0100
commit14e2354eeaf1f89a0f81302aa92661977be15daf (patch)
tree996c4e548cf91289701413059545c15bbafa80a8 /app
parentf17fc5742e539db10e0e430f5218c440849b894c (diff)
Fix status mismatch of sensitive check (#21724)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/reducers/compose.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js
index 8cc7bf520..1dafb07fd 100644
--- a/app/javascript/mastodon/reducers/compose.js
+++ b/app/javascript/mastodon/reducers/compose.js
@@ -337,6 +337,10 @@ export default function compose(state = initialState, action) {
       if (action.status.get('spoiler_text').length > 0) {
         map.set('spoiler', true);
         map.set('spoiler_text', action.status.get('spoiler_text'));
+
+        if (map.get('media_attachments').size >= 1) {
+          map.set('sensitive', true);
+        }
       } else {
         map.set('spoiler', false);
         map.set('spoiler_text', '');