about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2024-05-20 17:19:01 -0500
committerGitHub <noreply@github.com>2024-05-20 17:19:01 -0500
commit22522090c23df68251bdb37842323ffa1f7ea06d (patch)
tree9a5a3988247e732234671f08b06e708cc1d77403 /src
parente98bf6521bfeb3b18df284963bfa3b4c20a89727 (diff)
downloadvoidsky-22522090c23df68251bdb37842323ffa1f7ea06d.tar.zst
Ensure deleted chats don't count towards unread (#4129)
Diffstat (limited to 'src')
-rw-r--r--src/state/queries/messages/list-converations.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/state/queries/messages/list-converations.ts b/src/state/queries/messages/list-converations.ts
index 8319fdefe..25ac9a16e 100644
--- a/src/state/queries/messages/list-converations.ts
+++ b/src/state/queries/messages/list-converations.ts
@@ -59,7 +59,10 @@ export function useUnreadMessageCount() {
 
         // TODO could shadow this outside this hook and get optimistic block state
         const moderation = moderateProfile(otherMember, moderationOpts)
-        const shouldIgnore = convo.muted || moderation.blocked
+        const shouldIgnore =
+          convo.muted ||
+          moderation.blocked ||
+          otherMember.did === 'missing.invalid'
         const unreadCount = !shouldIgnore && convo.unreadCount > 0 ? 1 : 0
 
         return acc + unreadCount