mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-01 20:08:57 +00:00
wip
This commit is contained in:
@@ -3210,6 +3210,9 @@ processAgentMessageConn cxt user@User {userId} corrId agentConnId agentMessage =
|
||||
messageError "x.grp.mem.role with insufficient member permissions" $> Nothing
|
||||
| useRelays' gInfo && (isRosterRole memRole || isRosterRole fromRole) && senderRole /= GROwner =
|
||||
messageError "x.grp.mem.role: only the owner can change member, moderator and admin roles in relay groups" $> Nothing
|
||||
-- in channels the owner-signed roster delivers role changes to subscribers; a forwarded
|
||||
-- x.grp.mem.role landing after the roster already applied the role is a no-op, suppress it
|
||||
| useRelays' gInfo && fromRole == memRole = pure $ memberEventDeliveryScope member
|
||||
| otherwise = do
|
||||
withStore' $ \db -> updateGroupMemberRole db user member memRole
|
||||
(gInfo'', m', scopeInfo) <- mkGroupChatScope gInfo' m
|
||||
|
||||
@@ -8889,7 +8889,6 @@ testChannelsSenderDeduplicateOwn ps = do
|
||||
]
|
||||
cath
|
||||
<### [ EndsWith "updated to dan",
|
||||
"#team: member role did not change",
|
||||
"#team: bob introduced dan (Daniel) in the channel",
|
||||
WithTime "#team> 1 [>>]",
|
||||
WithTime "#team> 2 [>>]",
|
||||
@@ -8898,7 +8897,6 @@ testChannelsSenderDeduplicateOwn ps = do
|
||||
]
|
||||
dan
|
||||
<### [ EndsWith "updated to cath",
|
||||
"#team: member role did not change",
|
||||
"#team: bob introduced cath (Catherine) in the channel",
|
||||
WithTime "#team> 1 [>>]",
|
||||
WithTime "#team> 2 [>>]",
|
||||
@@ -8909,8 +8907,6 @@ testChannelsSenderDeduplicateOwn ps = do
|
||||
eve
|
||||
<### [ EndsWith "updated to cath",
|
||||
EndsWith "updated to dan",
|
||||
"#team: member role did not change",
|
||||
"#team: member role did not change",
|
||||
"#team: bob introduced cath (Catherine) in the channel",
|
||||
"#team: bob introduced dan (Daniel) in the channel",
|
||||
WithTime "#team> 1 [>>]",
|
||||
@@ -9081,21 +9077,17 @@ testChannelMultipleLargeProfiles ps =
|
||||
]
|
||||
cath
|
||||
<### [ EndsWith "updated to dan",
|
||||
"#team: member role did not change",
|
||||
"#team: bob introduced dan (Daniel) in the channel",
|
||||
WithTime "#team dan> from dan [>>]"
|
||||
]
|
||||
dan
|
||||
<### [ EndsWith "updated to cath",
|
||||
"#team: member role did not change",
|
||||
"#team: bob introduced cath (Catherine) in the channel",
|
||||
WithTime "#team cath> from cath [>>]"
|
||||
]
|
||||
eve
|
||||
<### [ EndsWith "updated to cath",
|
||||
EndsWith "updated to dan",
|
||||
"#team: member role did not change",
|
||||
"#team: member role did not change",
|
||||
"#team: bob introduced dan (Daniel) in the channel",
|
||||
"#team: bob introduced cath (Catherine) in the channel",
|
||||
WithTime "#team cath> from cath [>>]",
|
||||
|
||||
Reference in New Issue
Block a user