This commit is contained in:
spaced4ndy
2026-06-10 18:51:38 +04:00
parent d2a914d0de
commit 239853d608
2 changed files with 3 additions and 8 deletions
+3
View File
@@ -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
-8
View File
@@ -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 [>>]",