Link prior art and reasoning why we still always join before (#190)

See https://github.com/matrix-org/matrix-public-archive/issues/50
This commit is contained in:
Eric Eastwood 2023-04-26 16:39:53 -05:00 committed by GitHub
parent e20a67d2ba
commit c297270f39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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);