fix: reopen pending human conversations
Build and publish Docker images / Build and publish images (push) Successful in 2m23s
Build and publish Docker images / Build and publish images (push) Successful in 2m23s
This commit is contained in:
@@ -8,6 +8,7 @@ import { getConversationAPI } from '../../api/conversation';
|
||||
const state = {
|
||||
id: '',
|
||||
status: '',
|
||||
aiTakeoverActive: false,
|
||||
};
|
||||
|
||||
export const getters = {
|
||||
@@ -37,16 +38,21 @@ export const mutations = {
|
||||
[SET_CONVERSATION_ATTRIBUTES]($state, data) {
|
||||
$state.id = data.id;
|
||||
$state.status = data.status;
|
||||
$state.aiTakeoverActive = data.ai_takeover_active === true;
|
||||
},
|
||||
[UPDATE_CONVERSATION_ATTRIBUTES]($state, data) {
|
||||
if (data.id === $state.id) {
|
||||
$state.id = data.id;
|
||||
$state.status = data.status;
|
||||
if (Object.prototype.hasOwnProperty.call(data, 'ai_takeover_active')) {
|
||||
$state.aiTakeoverActive = data.ai_takeover_active === true;
|
||||
}
|
||||
}
|
||||
},
|
||||
[CLEAR_CONVERSATION_ATTRIBUTES]($state) {
|
||||
$state.id = '';
|
||||
$state.status = '';
|
||||
$state.aiTakeoverActive = false;
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user