mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-23 18:09:27 -05:00
Skip spam check for admin users
This commit is contained in:
parent
2a7ed700d5
commit
41fd9989a2
@ -213,14 +213,14 @@ class RoomMemberHandler(BaseHandler):
|
||||
|
||||
if effective_membership_state == "invite":
|
||||
block_invite = False
|
||||
if self.hs.config.block_non_admin_invites:
|
||||
is_requester_admin = yield self.auth.is_server_admin(
|
||||
requester.user,
|
||||
)
|
||||
if not is_requester_admin:
|
||||
block_invite = True
|
||||
|
||||
if not self.spam_checker.user_may_invite(requester.user):
|
||||
if (
|
||||
self.hs.config.block_non_admin_invites or
|
||||
not self.spam_checker.user_may_invite(requester.user)
|
||||
):
|
||||
block_invite = True
|
||||
|
||||
if block_invite:
|
||||
|
Loading…
Reference in New Issue
Block a user