clear quoting event even on send fail, as then we can click retry

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2018-03-16 00:03:50 +01:00
parent 14f29e4740
commit 0ed3563748
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with 5 additions and 5 deletions

View File

@ -869,15 +869,15 @@ export default class MessageComposerInput extends React.Component {
} }
} }
this.client.sendMessage(this.props.room.roomId, content).done((res) => { this.client.sendMessage(this.props.room.roomId, content).finally(() => {
dis.dispatch({
action: 'message_sent',
});
// Once replies are not only for text, we can use message_sent for this
dis.dispatch({ dis.dispatch({
action: 'reply_to_event', action: 'reply_to_event',
event: null, event: null,
}); });
}).done((res) => {
dis.dispatch({
action: 'message_sent',
});
}, (e) => onSendMessageFailed(e, this.props.room)); }, (e) => onSendMessageFailed(e, this.props.room));
this.setState({ this.setState({