diff options
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/room.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 604eb6ec15..53a2a5df46 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -33,6 +33,7 @@ from typing import ( import attr from typing_extensions import TypedDict +import synapse from synapse.api.constants import ( EventContentFields, EventTypes, @@ -407,9 +408,10 @@ class RoomCreationHandler: """ user_id = requester.user.to_string() - if not await self.spam_checker.user_may_create_room(user_id): + spam_check = await self.spam_checker.user_may_create_room(user_id) + if spam_check is not synapse.spam_checker_api.ALLOW: raise SynapseError( - 403, "You are not permitted to create rooms", Codes.FORBIDDEN + 403, "This room creation request has been rejected", spam_check ) creation_content: JsonDict = { |