032: accept bare room IDs (tuwunel 1.9.4 mints and serves them without :server)

This commit is contained in:
glass beadian 2026-10-12 23:10:59 +00:00
parent fd09967851
commit cbbe713dea
2 changed files with 12 additions and 7 deletions

View file

@ -115,13 +115,7 @@ export class MatrixHttpClient implements MatrixAdminPort {
if (typeof body.room_id !== "string" || body.room_id === "") {
throw new ProvisionerUnavailableError("createRoom response missing room_id");
}
// Some homeservers return the bare localpart; the full room ID carries the
// server name, and every downstream consumer (DB checks, invites, joins)
// requires the complete form.
const roomId = body.room_id.includes(":")
? body.room_id
: `${body.room_id}:${this.config.homeserverUrl.host}`;
return { roomId };
return { roomId: body.room_id };
}
async sendStateEvent(