From 22522090c23df68251bdb37842323ffa1f7ea06d Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 20 May 2024 17:19:01 -0500 Subject: [PATCH] Ensure deleted chats don't count towards unread (#4129) --- src/state/queries/messages/list-converations.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/state/queries/messages/list-converations.ts b/src/state/queries/messages/list-converations.ts index 8319fdef..25ac9a16 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