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

Commit

Permalink
Allow room_alias_name parameter to be handled by /createRoom calls …
Browse files Browse the repository at this point in the history
…on workers (#10757)
  • Loading branch information
anoadragon453 authored Sep 6, 2021
1 parent 7bb3673 commit 40a1fdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit 40a1fdd

Please sign in to comment.