mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Only fetch aliases when publishing rooms
This commit is contained in:
parent
f666fe36d7
commit
f61b2068e6
@ -417,14 +417,14 @@ class DirectoryHandler(BaseHandler):
|
|||||||
|
|
||||||
yield self.auth.check_can_change_room_list(room_id, requester.user)
|
yield self.auth.check_can_change_room_list(room_id, requester.user)
|
||||||
|
|
||||||
|
making_public = visibility == "public"
|
||||||
|
if making_public:
|
||||||
room_aliases = yield self.store.get_aliases_for_room(room_id)
|
room_aliases = yield self.store.get_aliases_for_room(room_id)
|
||||||
canonical_alias = yield self.store.get_canonical_alias_for_room(room_id)
|
canonical_alias = yield self.store.get_canonical_alias_for_room(room_id)
|
||||||
if canonical_alias:
|
if canonical_alias:
|
||||||
room_aliases.append(canonical_alias)
|
room_aliases.append(canonical_alias)
|
||||||
|
|
||||||
making_public = visibility == "public"
|
if not self.config.is_publishing_room_allowed(
|
||||||
|
|
||||||
if making_public and not self.config.is_publishing_room_allowed(
|
|
||||||
user_id, room_id, room_aliases,
|
user_id, room_id, room_aliases,
|
||||||
):
|
):
|
||||||
# Lets just return a generic message, as there may be all sorts of
|
# Lets just return a generic message, as there may be all sorts of
|
||||||
|
Loading…
Reference in New Issue
Block a user