mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-18 23:29:12 -04:00
Stop shadow-banned users from sending invites. (#8095)
This commit is contained in:
parent
318f4e738e
commit
e259d63f73
7 changed files with 226 additions and 31 deletions
|
@ -316,6 +316,9 @@ class JoinRoomAliasServlet(RestServlet):
|
|||
join_rules_event = room_state.get((EventTypes.JoinRules, ""))
|
||||
if join_rules_event:
|
||||
if not (join_rules_event.content.get("join_rule") == JoinRules.PUBLIC):
|
||||
# update_membership with an action of "invite" can raise a
|
||||
# ShadowBanError. This is not handled since it is assumed that
|
||||
# an admin isn't going to call this API with a shadow-banned user.
|
||||
await self.room_member_handler.update_membership(
|
||||
requester=requester,
|
||||
target=fake_requester.user,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue