Ensure deleted chats don't count towards unread (#4129)
This commit is contained in:
@@ -59,7 +59,10 @@ export function useUnreadMessageCount() {
|
|||||||
|
|
||||||
// TODO could shadow this outside this hook and get optimistic block state
|
// TODO could shadow this outside this hook and get optimistic block state
|
||||||
const moderation = moderateProfile(otherMember, moderationOpts)
|
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
|
const unreadCount = !shouldIgnore && convo.unreadCount > 0 ? 1 : 0
|
||||||
|
|
||||||
return acc + unreadCount
|
return acc + unreadCount
|
||||||
|
|||||||
Reference in New Issue
Block a user