mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-23 06:20:35 -04:00
Uniformize spam-checker API, part 5: expand other spam-checker callbacks to return Tuple[Codes, dict]
(#13044)
Signed-off-by: David Teller <davidt@element.io> Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
This commit is contained in:
parent
d736d5cfad
commit
11f811470f
12 changed files with 426 additions and 60 deletions
|
@ -149,7 +149,8 @@ class DirectoryHandler:
|
|||
raise AuthError(
|
||||
403,
|
||||
"This user is not permitted to create this alias",
|
||||
spam_check,
|
||||
errcode=spam_check[0],
|
||||
additional_fields=spam_check[1],
|
||||
)
|
||||
|
||||
if not self.config.roomdirectory.is_alias_creation_allowed(
|
||||
|
@ -441,7 +442,8 @@ class DirectoryHandler:
|
|||
raise AuthError(
|
||||
403,
|
||||
"This user is not permitted to publish rooms to the room list",
|
||||
spam_check,
|
||||
errcode=spam_check[0],
|
||||
additional_fields=spam_check[1],
|
||||
)
|
||||
|
||||
if requester.is_guest:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue