Ensure deleted chats don't count towards unread (#4129)

zio/stable
Eric Bailey 2024-05-20 17:19:01 -05:00 committed by GitHub
parent e98bf6521b
commit 22522090c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -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