pendingStatus: fix crash when replying to self

This commit is contained in:
Alex Gleason 2022-02-19 22:49:12 -05:00
parent 4e441a5d0f
commit 1130373c02
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 2 additions and 2 deletions

View file

@ -219,7 +219,7 @@ export function submitCompose(routerHistory, force = false) {
const status = state.getIn(['compose', 'text'], '');
const media = state.getIn(['compose', 'media_attachments']);
let to = state.getIn(['compose', 'to'], null);
let to = state.getIn(['compose', 'to']);
if (!validateSchedule(state)) {
dispatch(snackbar.error(messages.scheduleError));

View file

@ -428,7 +428,7 @@ export default function compose(state = initialState, action) {
case REDRAFT:
return state.withMutations(map => {
map.set('text', action.raw_text || unescapeHTML(expandMentions(action.status)));
map.set('to', action.explicitAddressing ? getExplicitMentions(action.status.get('account', 'id'), action.status) : null);
map.set('to', action.explicitAddressing ? getExplicitMentions(action.status.get('account', 'id'), action.status) : undefined);
map.set('in_reply_to', action.status.get('in_reply_to_id'));
map.set('privacy', action.status.get('visibility'));
// TODO: Actually fix this rather than just removing it