From 0ed35637489e8f9f776b5515ac4f74dc5180de3c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 16 Mar 2018 00:03:50 +0100 Subject: [PATCH] clear quoting event even on send fail, as then we can click retry Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/rooms/MessageComposerInput.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index 956091215f..fcd3d4ed03 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -869,15 +869,15 @@ export default class MessageComposerInput extends React.Component { } } - this.client.sendMessage(this.props.room.roomId, content).done((res) => { - dis.dispatch({ - action: 'message_sent', - }); - // Once replies are not only for text, we can use message_sent for this + this.client.sendMessage(this.props.room.roomId, content).finally(() => { dis.dispatch({ action: 'reply_to_event', event: null, }); + }).done((res) => { + dis.dispatch({ + action: 'message_sent', + }); }, (e) => onSendMessageFailed(e, this.props.room)); this.setState({