feat: Allow users to mark a conversation as unread (#5924)
Allow users to mark conversations as unread. Loom video: https://www.loom.com/share/ab70552d3c9c48b685da7dfa64be8bb3 fixes: #5552 Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
@@ -146,13 +146,16 @@ export const mutations = {
|
||||
_state.listLoadingStatus = false;
|
||||
},
|
||||
|
||||
[types.MARK_MESSAGE_READ](_state, { id, lastSeen }) {
|
||||
[types.UPDATE_MESSAGE_UNREAD_COUNT](
|
||||
_state,
|
||||
{ id, lastSeen, unreadCount = 0 }
|
||||
) {
|
||||
const [chat] = _state.allConversations.filter(c => c.id === id);
|
||||
if (chat) {
|
||||
chat.agent_last_seen_at = lastSeen;
|
||||
Vue.set(chat, 'agent_last_seen_at', lastSeen);
|
||||
Vue.set(chat, 'unread_count', unreadCount);
|
||||
}
|
||||
},
|
||||
|
||||
[types.CHANGE_CHAT_STATUS_FILTER](_state, data) {
|
||||
_state.chatStatusFilter = data;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user