Chatwoot/app/javascript/widget/store/modules/conversation/index.js

45 lines
736 B
JavaScript
Raw Normal View History

import { getters } from './getters';
import { actions } from './actions';
import { mutations } from './mutations';
2021-08-13 09:58:53 +00:00
/* const state = {
2021-08-12 11:53:13 +00:00
conversations: {
byId: {},
allIds: [],
},
messages: {
byId: {},
allIds: [],
},
meta: {
2021-08-12 11:53:13 +00:00
byId: {
// 1: { allMessagesLoaded: false, isAgentTyping: false, isCreating: false },
},
},
uiFlags: {
isFetchingList: false,
},
2021-08-13 09:58:53 +00:00
activeConversationId: undefined
}; */
const state = {
conversations: {},
meta: {
userLastSeenAt: undefined,
},
uiFlags: {
allMessagesLoaded: false,
isFetchingList: false,
isAgentTyping: false,
isCreating: false,
},
};
export default {
namespaced: true,
state,
getters,
actions,
mutations,
};