about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkedama <kedama@foresdon.jp>2022-11-28 04:36:21 +0900
committerClaire <claire.github-309c@sitedethib.com>2022-11-28 11:53:21 +0100
commit32b43a96a774c169dd3023570656a5f89d10bb6d (patch)
tree91beb738cd291cfd2f2d0c2a7e94b9151c03a3bf
parenta2e7997592dd86baa7595c41eed274be4c200d07 (diff)
[Glitch] Fix status mismatch of sensitive check
Port 14e2354eeaf1f89a0f81302aa92661977be15daf to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
-rw-r--r--app/javascript/flavours/glitch/reducers/compose.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js
index 1edc70add..b1c792406 100644
--- a/app/javascript/flavours/glitch/reducers/compose.js
+++ b/app/javascript/flavours/glitch/reducers/compose.js
@@ -578,6 +578,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', '');