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

Commit 40a1fdd

Browse files
Allow room_alias_name parameter to be handled by /createRoom calls on workers (#10757)
1 parent 7bb3673 commit 40a1fdd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

changelog.d/10757.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug which prevented calls to `/createRoom` that included the `room_alias_name` parameter from being handled by worker processes.

synapse/storage/databases/main/directory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ async def get_aliases_for_room(self, room_id: str) -> List[str]:
7575
desc="get_aliases_for_room",
7676
)
7777

78-
79-
class DirectoryStore(DirectoryWorkerStore):
8078
async def create_room_alias_association(
8179
self,
8280
room_alias: RoomAlias,
@@ -126,6 +124,8 @@ def alias_txn(txn):
126124
409, "Room alias %s already exists" % room_alias.to_string()
127125
)
128126

127+
128+
class DirectoryStore(DirectoryWorkerStore):
129129
async def delete_room_alias(self, room_alias: RoomAlias) -> str:
130130
room_id = await self.db_pool.runInteraction(
131131
"delete_room_alias", self._delete_room_alias_txn, room_alias

0 commit comments

Comments
 (0)