mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-17 19:30:23 -04:00
Merge remote-tracking branch 'upstream/release-v1.61'
This commit is contained in:
commit
1543a3643e
235 changed files with 5079 additions and 14896 deletions
|
@ -45,6 +45,7 @@ class DirectoryHandler:
|
|||
self.appservice_handler = hs.get_application_service_handler()
|
||||
self.event_creation_handler = hs.get_event_creation_handler()
|
||||
self.store = hs.get_datastores().main
|
||||
self._storage_controllers = hs.get_storage_controllers()
|
||||
self.config = hs.config
|
||||
self.enable_room_list_search = hs.config.roomdirectory.enable_room_list_search
|
||||
self.require_membership = hs.config.server.require_membership_for_aliases
|
||||
|
@ -321,7 +322,7 @@ class DirectoryHandler:
|
|||
Raises:
|
||||
ShadowBanError if the requester has been shadow-banned.
|
||||
"""
|
||||
alias_event = await self.state.get_current_state(
|
||||
alias_event = await self._storage_controllers.state.get_current_state_event(
|
||||
room_id, EventTypes.CanonicalAlias, ""
|
||||
)
|
||||
|
||||
|
@ -465,7 +466,11 @@ class DirectoryHandler:
|
|||
making_public = visibility == "public"
|
||||
if making_public:
|
||||
room_aliases = await self.store.get_aliases_for_room(room_id)
|
||||
canonical_alias = await self.store.get_canonical_alias_for_room(room_id)
|
||||
canonical_alias = (
|
||||
await self._storage_controllers.state.get_canonical_alias_for_room(
|
||||
room_id
|
||||
)
|
||||
)
|
||||
if canonical_alias:
|
||||
room_aliases.append(canonical_alias)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue