diff --git a/src/Simplex/Chat/View.hs b/src/Simplex/Chat/View.hs index 7074d3e6a8..3d519c3b5c 100644 --- a/src/Simplex/Chat/View.hs +++ b/src/Simplex/Chat/View.hs @@ -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 _ [] = [] diff --git a/tests/ChatTests/Direct.hs b/tests/ChatTests/Direct.hs index 26bc7a54de..09b2d7d51c 100644 --- a/tests/ChatTests/Direct.hs +++ b/tests/ChatTests/Direct.hs @@ -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 "