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

Allow room_alias_name parameter to be handled by /createRoom calls on workers #10757

Merged
merged 2 commits into from
Sep 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/10757.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug which prevented calls to `/createRoom` that included the `room_alias_name` parameter from being handled by worker processes.
4 changes: 2 additions & 2 deletions synapse/storage/databases/main/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ async def get_aliases_for_room(self, room_id: str) -> List[str]:
desc="get_aliases_for_room",
)


class DirectoryStore(DirectoryWorkerStore):
async def create_room_alias_association(
self,
room_alias: RoomAlias,
Expand Down Expand Up @@ -126,6 +124,8 @@ def alias_txn(txn):
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
Expand Down