Skip to content
Snippets Groups Projects
Unverified Commit 14e2354e authored by kedama's avatar kedama Committed by GitHub
Browse files

Fix status mismatch of sensitive check (#21724)

parent f17fc574
No related branches found
No related tags found
No related merge requests found
......@@ -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', '');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment