Skip to content

Commit ba531bd

Browse files
committed
fix: ignore chats from the current user when processing unread messages
1 parent db20dc2 commit ba531bd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/services/notificationService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class NotificationService {
5959

6060
const newUnreadIds = new Set<string>();
6161
for (const chat of filteredChats) {
62+
if (chat.lastMessage?.from === authService.currentUser.uid) continue;
6263
const lastMessageTime = chat.updatedAt instanceof Timestamp ? chat.updatedAt.toDate().getTime() : 0;
6364
const lastReadTime = readTimestamps[chat.id] || 0;
6465

0 commit comments

Comments
 (0)