fix: Add a check for 24 hour window before sending a message (#1084)

Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2020-07-25 22:54:45 +05:30
committed by GitHub
parent 12ee7e5d82
commit 0f2d3418f9
26 changed files with 292 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ import Vue from 'vue';
import * as types from '../../mutation-types';
import ConversationApi from '../../../api/inbox/conversation';
import MessageApi from '../../../api/inbox/message';
import { MESSAGE_TYPE } from 'widget/helpers/constants';
// actions
const actions = {
@@ -136,6 +137,12 @@ const actions = {
addMessage({ commit }, message) {
commit(types.default.ADD_MESSAGE, message);
if (message.message_type === MESSAGE_TYPE.INCOMING) {
commit(types.default.SET_CONVERSATION_CAN_REPLY, {
conversationId: message.conversation_id,
canReply: true,
});
}
},
updateMessage({ commit }, message) {