core: prohibit connecting via direct message for blocked members (#6124)

This commit is contained in:
spaced4ndy authored and GitHub committed 2025-07-29 08:42:39 +00:00
1 parent 671678b2aa
commit baf12207d5
4 files changed
+42 -33

No files matched your search

+1 -1
View File
@@ -567,7 +567,7 @@ userNtf User {showNtfs, activeUser} = showNtfs || activeUser
chatDirNtf :: User -> ChatInfo c -> CIDirection c d -> Bool -> Bool
chatDirNtf user cInfo chatDir mention = case (cInfo, chatDir) of
(DirectChat ct, CIDirectRcv) -> contactNtf user ct mention
(GroupChat g _scopeInfo, CIGroupRcv m) -> groupNtf user g mention && not (blockedByAdmin m) && showMessages (memberSettings m)
(GroupChat g _scopeInfo, CIGroupRcv m) -> groupNtf user g mention && not (memberBlocked m)
_ -> True
contactNtf :: User -> Contact -> Bool -> Bool