From b08044c06d48b95456fbcc0533e8d13a1b38f723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Mon, 3 Jul 2023 19:30:38 +0200 Subject: [PATCH] More fixes of id vs alias MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/home/UnauthenticatedView.tsx | 6 +++--- test/home/CallList-test.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/home/UnauthenticatedView.tsx b/src/home/UnauthenticatedView.tsx index f49cf218..820b11ab 100644 --- a/src/home/UnauthenticatedView.tsx +++ b/src/home/UnauthenticatedView.tsx @@ -78,9 +78,9 @@ export const UnauthenticatedView: FC = () => { true ); - let roomIdOrAlias: string; + let roomAlias: string; try { - [roomIdOrAlias] = await createRoom(client, roomName, ptt); + [roomAlias] = await createRoom(client, roomName, ptt); } catch (error) { if (error.errcode === "M_ROOM_IN_USE") { setOnFinished(() => { @@ -99,7 +99,7 @@ export const UnauthenticatedView: FC = () => { // Only consider the registration successful if we managed to create the room, too setClient(client, session); - history.push(`/${roomIdOrAlias.substring(1).split(":")[0]}`); + history.push(`/${roomAlias.substring(1).split(":")[0]}`); } submit().catch((error) => { diff --git a/test/home/CallList-test.tsx b/test/home/CallList-test.tsx index 7dfb7b21..a161960f 100644 --- a/test/home/CallList-test.tsx +++ b/test/home/CallList-test.tsx @@ -34,7 +34,7 @@ describe("CallList", () => { it("should show room", async () => { const rooms = [ - { roomName: "Room #1", roomAlias: "!roomId" }, + { roomName: "Room #1", roomAlias: "#room-name:server.org" }, ] as GroupCallRoom[]; const result = renderComponent(rooms);