Compose: send `sensitive: true` when spoiler is enabled

This commit is contained in:
Alex Gleason 2022-10-31 15:38:23 -05:00
parent aea7bdcaa0
commit 9ea0b9cdbe
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 4 deletions

View File

@ -296,11 +296,8 @@ export default function compose(state = initialState, action: AnyAction) {
return updateCompose(state, action.id, compose => compose.withMutations(map => {
map.set('spoiler_text', '');
map.set('spoiler', !compose.spoiler);
map.set('sensitive', !compose.spoiler);
map.set('idempotencyKey', uuid());
if (!compose.sensitive && compose.media_attachments.size >= 1) {
map.set('sensitive', true);
}
}));
case COMPOSE_SPOILER_TEXT_CHANGE:
return updateCompose(state, action.id, compose => compose