mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-30 22:55:48 +00:00
cli: do not log events for hidden user profiles (#4658)
* cli: do not log events for hidden user profiles * fix
This commit is contained in:
@@ -415,8 +415,8 @@ responseToView hu@(currentRH, user_) ChatConfig {logLevel, showReactions, showRe
|
||||
CRCustomChatResponse u r -> ttyUser' u $ map plain $ T.lines r
|
||||
where
|
||||
ttyUser :: User -> [StyledString] -> [StyledString]
|
||||
ttyUser user@User {showNtfs, activeUser} ss
|
||||
| showNtfs || activeUser = ttyUserPrefix user ss
|
||||
ttyUser user@User {showNtfs, activeUser, viewPwdHash} ss
|
||||
| (showNtfs && isNothing viewPwdHash) || activeUser = ttyUserPrefix user ss
|
||||
| otherwise = []
|
||||
ttyUserPrefix :: User -> [StyledString] -> [StyledString]
|
||||
ttyUserPrefix _ [] = []
|
||||
|
||||
@@ -2032,6 +2032,8 @@ testUserPrivacy =
|
||||
bob <# "alisa> hello"
|
||||
bob #> "@alisa hey"
|
||||
alice <# "bob> hey"
|
||||
bob #> "@alice hey"
|
||||
(alice, "[user: alice] ") ^<# "bob> hey"
|
||||
-- hide user profile
|
||||
alice ##> "/hide user my_password"
|
||||
userHidden alice "current "
|
||||
|
||||
Reference in New Issue
Block a user