fix: Update unread_messages count in WhatsApp inboxes (#6154)

* fix: Update unread_count from backend instead of computing on the frontend

* Fix spec

* Remove status indicator on private notifications

* CodeClimate fix

* CodeClimate
This commit is contained in:
Pranav Raj S
2022-12-30 13:13:33 -08:00
committed by GitHub
parent 12b45f5c76
commit 5d1be70e67
4 changed files with 9 additions and 2 deletions

View File

@@ -108,6 +108,8 @@ export const mutations = {
} else {
chat.messages.push(message);
chat.timestamp = message.created_at;
const { conversation: { unread_count: unreadCount = 0 } = {} } = message;
chat.unread_count = unreadCount;
if (selectedChatId === conversationId) {
window.bus.$emit(BUS_EVENTS.SCROLL_TO_MESSAGE);
}