Fix status mismatch of sensitive check (#21724)

This commit is contained in:
kedama 2022-11-28 04:36:21 +09:00 committed by GitHub
parent 05b1b5790f
commit 691b827c87

View file

@ -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', '');