feat: Vite + vue 3 💚 (#10047)
Fixes https://github.com/chatwoot/chatwoot/issues/8436 Fixes https://github.com/chatwoot/chatwoot/issues/9767 Fixes https://github.com/chatwoot/chatwoot/issues/10156 Fixes https://github.com/chatwoot/chatwoot/issues/6031 Fixes https://github.com/chatwoot/chatwoot/issues/5696 Fixes https://github.com/chatwoot/chatwoot/issues/9250 Fixes https://github.com/chatwoot/chatwoot/issues/9762 --------- Co-authored-by: Pranav <pranavrajs@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import Vue from 'vue';
|
||||
import * as types from '../mutation-types';
|
||||
import ConversationAPI from '../../api/inbox/conversation';
|
||||
const state = {
|
||||
@@ -43,7 +42,10 @@ export const mutations = {
|
||||
record => record.id === user.id && record.type === user.type
|
||||
).length;
|
||||
if (!hasUserRecordAlready) {
|
||||
Vue.set($state.records, conversationId, [...records, user]);
|
||||
$state.records = {
|
||||
...$state.records,
|
||||
[conversationId]: [...records, user],
|
||||
};
|
||||
}
|
||||
},
|
||||
[types.default.REMOVE_USER_TYPING_FROM_CONVERSATION]: (
|
||||
@@ -54,7 +56,10 @@ export const mutations = {
|
||||
const updatedRecords = records.filter(
|
||||
record => record.id !== user.id || record.type !== user.type
|
||||
);
|
||||
Vue.set($state.records, conversationId, updatedRecords);
|
||||
$state.records = {
|
||||
...$state.records,
|
||||
[conversationId]: updatedRecords,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user