Chore: Move conversationStats to a seperate module (#962)

* Chore: Move conversationStats to a seperate module

* Move toggleTyping to conversationTypingStatus

* Remove unused agentTyping flag

* Fix review comments
This commit is contained in:
Pranav Raj S
2020-06-14 14:07:52 +05:30
committed by GitHub
parent 5ec9af9325
commit 5cb88237f5
16 changed files with 139 additions and 98 deletions
@@ -1,6 +1,6 @@
import Vue from 'vue';
import * as types from '../mutation-types';
import ConversationAPI from '../../api/inbox/conversation';
const state = {
records: {},
};
@@ -12,6 +12,13 @@ export const getters = {
};
export const actions = {
toggleTyping: async (_, { status, conversationId }) => {
try {
await ConversationAPI.toggleTyping({ status, conversationId });
} catch (error) {
// Handle error
}
},
create: ({ commit }, { conversationId, user }) => {
commit(types.default.ADD_USER_TYPING_TO_CONVERSATION, {
conversationId,