mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-30 23:27:55 -05:00
Don't show own messages as unread in chat
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user