From 14e2354eeaf1f89a0f81302aa92661977be15daf Mon Sep 17 00:00:00 2001 From: kedama Date: Mon, 28 Nov 2022 04:36:21 +0900 Subject: [PATCH] Fix status mismatch of sensitive check (#21724) --- app/javascript/mastodon/reducers/compose.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index 8cc7bf5205..1dafb07fd2 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', '');