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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user