fix: Remove duplicate message in slow networks (#1332)

This commit is contained in:
Pranav Raj S
2020-10-11 20:24:26 +05:30
committed by GitHub
parent 59bee66e63
commit 58c0792920
4 changed files with 108 additions and 17 deletions

View File

@@ -129,7 +129,7 @@ const actions = {
sendMessage: async ({ commit }, data) => {
try {
const response = await MessageApi.create(data);
commit(types.default.SEND_MESSAGE, response.data);
commit(types.default.ADD_MESSAGE, response.data);
} catch (error) {
// Handle error
}
@@ -209,7 +209,7 @@ const actions = {
sendAttachment: async ({ commit }, data) => {
try {
const response = await MessageApi.sendAttachment(data);
commit(types.default.SEND_MESSAGE, response.data);
commit(types.default.ADD_MESSAGE, response.data);
} catch (error) {
// Handle error
}