Chatwoot/app/javascript/widget/store/modules/messageV2/index.js
Nithin David Thomas 211f5cdedd
feat: Refactors API on widget side to support multiple conversations (#3032)
* State structure

* How to refactr action modules

* feat: Add state and mutations for multiple conversation on widget

* Adds actions to support multiple conversation

* feat: Adds public API endpoints for widget

* fixes lint errors

* Refactors store

* Update mutations to accommodate new changes in store

* Refactors actions in messages

* fixes broken tests
2021-09-23 11:56:24 +05:30

23 lines
407 B
JavaScript

import { getters } from './getters';
import { actions } from './actions';
import { mutations } from './mutations';
const state = {
messages: {
byId: {},
allIds: [],
uiFlags: {
byId: {
// 1: { isCreating: false, isPending: false, isDeleting: false, isUpdating: false },
},
},
},
};
export default {
namespaced: true,
state,
getters,
actions,
mutations,
};