Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Avoid circular dep
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Velten committed May 9, 2023
1 parent d9a1c31 commit ce7baad
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions synapse/handlers/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
from synapse.events.snapshot import UnpersistedEventContext
from synapse.events.utils import copy_and_fixup_power_levels_contents
from synapse.handlers.relations import BundledAggregations
from synapse.module_api import NOT_SPAM
from synapse.rest.admin._base import assert_user_is_admin
from synapse.streams import EventSource
from synapse.types import (
Expand Down Expand Up @@ -455,7 +454,7 @@ async def clone_existing_room(
spam_check = await self._spam_checker_module_callbacks.user_may_create_room(
user_id
)
if spam_check != NOT_SPAM:
if spam_check != self._spam_checker_module_callbacks.NOT_SPAM:
raise SynapseError(
403,
"You are not permitted to create rooms",
Expand Down Expand Up @@ -769,7 +768,7 @@ async def create_room(
spam_check = await self._spam_checker_module_callbacks.user_may_create_room(
user_id
)
if spam_check != NOT_SPAM:
if spam_check != self._spam_checker_module_callbacks.NOT_SPAM:
raise SynapseError(
403,
"You are not permitted to create rooms",
Expand Down

0 comments on commit ce7baad

Please sign in to comment.