mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 19:23:36 +00:00
do not remove link
This commit is contained in:
1 parent
83dfe2e816
commit
5de78ce211
2 files changed
+3
-4
No files matched your search
@@ -3123,8 +3123,6 @@ processAgentMessageConn cxt user@User {userId} corrId agentConnId agentMessage =
|
||||
messageError "x.grp.mem.role with insufficient member permissions" $> Nothing
|
||||
| otherwise = do
|
||||
withStore' $ \db -> updateGroupMemberRole db user member memRole
|
||||
when (memberId' member == membershipMemId && memRole < GRAdmin) $
|
||||
deleteGroupLinkIfExists user gInfo'
|
||||
(gInfo'', m', scopeInfo) <- mkGroupChatScope gInfo' m
|
||||
(ci, cInfo) <- saveRcvChatItemNoParse user (CDGroupRcv gInfo'' scopeInfo m') msg brokerTs (CIRcvGroupEvent gEvent)
|
||||
groupMsgToView cInfo ci
|
||||
|
||||
@@ -109,7 +109,7 @@ chatGroupTests = do
|
||||
it "invitee incognito" testGroupLinkInviteeIncognito
|
||||
it "incognito - join/invite" testGroupLinkIncognitoJoinInvite
|
||||
it "group link member role" testGroupLinkMemberRole
|
||||
it "demoted admin cannot keep using group link" testGroupLinkDemotedAdmin
|
||||
it "demotion does not remove group link" testGroupLinkDemotedAdmin
|
||||
it "host profile received" testGroupLinkHostProfileReceived
|
||||
it "existing contact merged" testGroupLinkExistingContactMerged
|
||||
describe "group links - member screening" $ do
|
||||
@@ -2977,8 +2977,9 @@ testGroupLinkDemotedAdmin =
|
||||
bob <## "#team: alice changed your role from admin to member"
|
||||
]
|
||||
|
||||
-- demotion does not remove bob's group link (it is preserved, usable again on re-promotion)
|
||||
bob ##> "/show link #team"
|
||||
bob <## "#team: you have insufficient permissions for this action, the required role is admin"
|
||||
void $ getGroupLink bob "team" GRMember False
|
||||
|
||||
testGroupLinkHostIncognito :: HasCallStack => TestParams -> IO ()
|
||||
testGroupLinkHostIncognito =
|
||||
|
||||
Reference in new issue
Block a user