summary refs log tree commit diff
path: root/synapse/server_notices
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2023-02-22 11:07:28 +0000
committerGitHub <noreply@github.com>2023-02-22 11:07:28 +0000
commit647ff3ef65e7a54b2719755802b4e6f2f45f5eb6 (patch)
treed571c0e3d4ee542e2814ea44b00a936b7fff62a8 /synapse/server_notices
parentTweak changelog (diff)
downloadsynapse-647ff3ef65e7a54b2719755802b4e6f2f45f5eb6.tar.xz
Remove unused `room_alias` field from `/createRoom` response (#15093)
* Change `create_room` return type

* Don't return room alias from /createRoom

* Update other callsites

* Fix up mypy complaints

It looks like new_room_user_id is None iff new_room_id is None. It's a
shame we haven't expressed this in a way that mypy can understand.

* Changelog
Diffstat (limited to 'synapse/server_notices')
-rw-r--r--synapse/server_notices/server_notices_manager.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/server_notices/server_notices_manager.py b/synapse/server_notices/server_notices_manager.py
index 564e3705c2..9732dbdb6e 100644
--- a/synapse/server_notices/server_notices_manager.py
+++ b/synapse/server_notices/server_notices_manager.py
@@ -178,7 +178,7 @@ class ServerNoticesManager:
                 "avatar_url": self._config.servernotices.server_notices_mxid_avatar_url,
             }
 
-        info, _ = await self._room_creation_handler.create_room(
+        room_id, _, _ = await self._room_creation_handler.create_room(
             requester,
             config={
                 "preset": RoomCreationPreset.PRIVATE_CHAT,
@@ -188,7 +188,6 @@ class ServerNoticesManager:
             ratelimit=False,
             creator_join_profile=join_profile,
         )
-        room_id = info["room_id"]
 
         self.maybe_get_notice_room_for_user.invalidate((user_id,))