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
1 changed files with 2 additions and 1 deletions

View File

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