From c297270f39224ae522f339e3ea617b081bdd90d1 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 26 Apr 2023 16:39:53 -0500 Subject: [PATCH] Link prior art and reasoning why we still always join before (#190) See https://github.com/matrix-org/matrix-public-archive/issues/50 --- server/routes/room-routes.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/routes/room-routes.js b/server/routes/room-routes.js index 7bd310b..0a49aca 100644 --- a/server/routes/room-routes.js +++ b/server/routes/room-routes.js @@ -772,7 +772,10 @@ router.get( // // XXX: It would be better if we just tried fetching first and assume that we are // already joined and only join after we see a 403 Forbidden error (we should do - // this for all places we `ensureRoomJoined`) + // this for all places we `ensureRoomJoined`). But we need the `roomId` for use with + // the various Matrix API's anyway and `/join/{roomIdOrAlias}` -> `{ room_id }` is a + // great way to get it (see + // https://github.com/matrix-org/matrix-public-archive/issues/50). const viaServers = parseViaServersFromUserInput(req.query.via); const roomId = await ensureRoomJoined(matrixAccessToken, roomIdOrAlias, viaServers);