summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2021-09-06 14:37:15 +0100
committerGitHub <noreply@github.com>2021-09-06 14:37:15 +0100
commit40a1fddd1b7843c25248fca409debab6d8393c59 (patch)
treed4eb288974560fb7a82961c48ac0448eeef8eb45
parentEase searching for M_TOO_LARGE-related error codes (#10750) (diff)
downloadsynapse-40a1fddd1b7843c25248fca409debab6d8393c59.tar.xz
Allow `room_alias_name` parameter to be handled by /createRoom calls on workers (#10757)
-rw-r--r--changelog.d/10757.bugfix1
-rw-r--r--synapse/storage/databases/main/directory.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/10757.bugfix b/changelog.d/10757.bugfix
new file mode 100644
index 0000000000..bce36ef242
--- /dev/null
+++ b/changelog.d/10757.bugfix
@@ -0,0 +1 @@
+Fix a bug which prevented calls to `/createRoom` that included the `room_alias_name` parameter from being handled by worker processes.
\ No newline at end of file
diff --git a/synapse/storage/databases/main/directory.py b/synapse/storage/databases/main/directory.py
index 86075bc55b..6daf8b8ffb 100644
--- a/synapse/storage/databases/main/directory.py
+++ b/synapse/storage/databases/main/directory.py
@@ -75,8 +75,6 @@ class DirectoryWorkerStore(SQLBaseStore):
             desc="get_aliases_for_room",
         )
 
-
-class DirectoryStore(DirectoryWorkerStore):
     async def create_room_alias_association(
         self,
         room_alias: RoomAlias,
@@ -126,6 +124,8 @@ class DirectoryStore(DirectoryWorkerStore):
                 409, "Room alias %s already exists" % room_alias.to_string()
             )
 
+
+class DirectoryStore(DirectoryWorkerStore):
     async def delete_room_alias(self, room_alias: RoomAlias) -> str:
         room_id = await self.db_pool.runInteraction(
             "delete_room_alias", self._delete_room_alias_txn, room_alias