cache the summary
This commit is contained in:
@@ -412,6 +412,17 @@ const actions = {
|
||||
});
|
||||
},
|
||||
|
||||
updateConversationCachedSummary(
|
||||
{ commit },
|
||||
{ conversationId, cachedSummary, cachedSummaryAt }
|
||||
) {
|
||||
commit(types.UPDATE_CONVERSATION_CACHED_SUMMARY, {
|
||||
conversationId,
|
||||
cachedSummary,
|
||||
cachedSummaryAt,
|
||||
});
|
||||
},
|
||||
|
||||
setChatStatusFilter({ commit }, data) {
|
||||
commit(types.CHANGE_CHAT_STATUS_FILTER, data);
|
||||
},
|
||||
|
||||
@@ -116,6 +116,16 @@ export const mutations = {
|
||||
chat.last_activity_at = lastActivityAt;
|
||||
}
|
||||
},
|
||||
[types.UPDATE_CONVERSATION_CACHED_SUMMARY](
|
||||
_state,
|
||||
{ conversationId, cachedSummary, cachedSummaryAt }
|
||||
) {
|
||||
const [chat] = _state.allConversations.filter(c => c.id === conversationId);
|
||||
if (chat) {
|
||||
chat.cached_summary = cachedSummary;
|
||||
chat.cached_summary_at = cachedSummaryAt;
|
||||
}
|
||||
},
|
||||
[types.ASSIGN_PRIORITY](_state, { priority, conversationId }) {
|
||||
const [chat] = _state.allConversations.filter(c => c.id === conversationId);
|
||||
chat.priority = priority;
|
||||
|
||||
Reference in New Issue
Block a user