git » sdk » commit f728d9d

Consider sent messages as read

author Stephen Paul Weber
2024-12-09 20:24:01 UTC
committer Stephen Paul Weber
2024-12-09 20:24:01 UTC
parent 40037254cc0a3eb07a0a21e6960b0f39ce66d352

Consider sent messages as read

snikket/Chat.hx +1 -1

diff --git a/snikket/Chat.hx b/snikket/Chat.hx
index a5fb50c..f5a2b5a 100644
--- a/snikket/Chat.hx
+++ b/snikket/Chat.hx
@@ -1058,7 +1058,7 @@ class Channel extends Chat {
 							serverIds[m.serverId] = true;
 						}
 					}
-					final readIndex = dedupedMessages.findIndex((m) -> m.serverId == readUpTo());
+					final readIndex = dedupedMessages.findIndex((m) -> m.serverId == readUpTo() || !m.isIncoming());
 					if (readIndex < 0) {
 						setUnreadCount(unreadCount() + dedupedMessages.length);
 					} else {