Mention the author when quote-posting them

Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1202
This commit is contained in:
Alex Gleason 2022-11-26 14:12:50 -06:00
parent 0be017ea78
commit 50ead4f16e
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -319,10 +319,11 @@ export default function compose(state = initialState, action: AnyAction) {
}));
case COMPOSE_QUOTE:
return updateCompose(state, 'compose-modal', compose => compose.withMutations(map => {
const author = action.status.getIn(['account', 'acct']);
const defaultCompose = state.get('default')!;
map.set('quote', action.status.get('id'));
map.set('to', ImmutableOrderedSet());
map.set('to', ImmutableOrderedSet([author]));
map.set('text', '');
map.set('privacy', privacyPreference(action.status.visibility, defaultCompose.privacy));
map.set('focusDate', new Date());