pendingStatus: fix crash when replying to self
This commit is contained in:
parent
4e441a5d0f
commit
1130373c02
|
@ -219,7 +219,7 @@ export function submitCompose(routerHistory, force = false) {
|
||||||
|
|
||||||
const status = state.getIn(['compose', 'text'], '');
|
const status = state.getIn(['compose', 'text'], '');
|
||||||
const media = state.getIn(['compose', 'media_attachments']);
|
const media = state.getIn(['compose', 'media_attachments']);
|
||||||
let to = state.getIn(['compose', 'to'], null);
|
let to = state.getIn(['compose', 'to']);
|
||||||
|
|
||||||
if (!validateSchedule(state)) {
|
if (!validateSchedule(state)) {
|
||||||
dispatch(snackbar.error(messages.scheduleError));
|
dispatch(snackbar.error(messages.scheduleError));
|
||||||
|
|
|
@ -428,7 +428,7 @@ export default function compose(state = initialState, action) {
|
||||||
case REDRAFT:
|
case REDRAFT:
|
||||||
return state.withMutations(map => {
|
return state.withMutations(map => {
|
||||||
map.set('text', action.raw_text || unescapeHTML(expandMentions(action.status)));
|
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('in_reply_to', action.status.get('in_reply_to_id'));
|
||||||
map.set('privacy', action.status.get('visibility'));
|
map.set('privacy', action.status.get('visibility'));
|
||||||
// TODO: Actually fix this rather than just removing it
|
// TODO: Actually fix this rather than just removing it
|
||||||
|
|
Loading…
Reference in New Issue