This commit is contained in:
Henry Jameson 2026-08-28 23:27:17 +03:00
commit 5dc3a87a97

View file

@ -77,7 +77,8 @@ export const useChatsStore = defineStore('chats', {
updateChat(updatedChat) { updateChat(updatedChat) {
const chat = this.data.get(updatedChat.id) const chat = this.data.get(updatedChat.id)
if (chat) { if (chat) {
const isNewMessage = chat.lastMessage?.id !== updatedChat.lastMessage?.id const isNewMessage =
chat.lastMessage?.id !== updatedChat.lastMessage?.id
chat.lastMessage = updatedChat.lastMessage chat.lastMessage = updatedChat.lastMessage
chat.unread = updatedChat.unread chat.unread = updatedChat.unread
chat.updated_at = updatedChat.updated_at chat.updated_at = updatedChat.updated_at