mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 03:27:52 +00:00
Bug: Fix duplicate messages while using enter key on slow network (#987)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
@@ -212,18 +212,19 @@ export default {
|
||||
if (this.message.length > this.maxLength) {
|
||||
return;
|
||||
}
|
||||
const newMessage = this.message;
|
||||
if (!this.showCannedResponsesList) {
|
||||
this.clearMessage();
|
||||
try {
|
||||
await this.$store.dispatch('sendMessage', {
|
||||
conversationId: this.currentChat.id,
|
||||
message: this.message,
|
||||
message: newMessage,
|
||||
private: this.isPrivate,
|
||||
});
|
||||
this.$emit('scrollToMessage');
|
||||
} catch (error) {
|
||||
// Error
|
||||
}
|
||||
this.clearMessage();
|
||||
this.hideEmojiPicker();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user