From 51c94d22297de97984b4f2fc67b134202cbcf4af Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:36:56 +0300 Subject: [PATCH] Don't show own messages as unread in chat --- app/features/chat/ChatProvider.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/features/chat/ChatProvider.tsx b/app/features/chat/ChatProvider.tsx index 965f423bf..a4a52abdc 100644 --- a/app/features/chat/ChatProvider.tsx +++ b/app/features/chat/ChatProvider.tsx @@ -327,8 +327,10 @@ function ChatProviderInner({ ), ); - if (roomCode === activeRoom && chatOpen) { + const isOwnMessage = msg.userId === userId; + if (isOwnMessage || (roomCode === activeRoom && chatOpen)) { writeLastReadCount(roomCode, msg.totalMessageCount); + setUnreadCounts((prev) => ({ ...prev, [roomCode]: 0 })); } else { setUnreadCounts((prev) => ({ ...prev,