More fixes of id vs alias
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -78,9 +78,9 @@ export const UnauthenticatedView: FC = () => {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
let roomIdOrAlias: string;
|
let roomAlias: string;
|
||||||
try {
|
try {
|
||||||
[roomIdOrAlias] = await createRoom(client, roomName, ptt);
|
[roomAlias] = await createRoom(client, roomName, ptt);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.errcode === "M_ROOM_IN_USE") {
|
if (error.errcode === "M_ROOM_IN_USE") {
|
||||||
setOnFinished(() => {
|
setOnFinished(() => {
|
||||||
@@ -99,7 +99,7 @@ export const UnauthenticatedView: FC = () => {
|
|||||||
|
|
||||||
// Only consider the registration successful if we managed to create the room, too
|
// Only consider the registration successful if we managed to create the room, too
|
||||||
setClient(client, session);
|
setClient(client, session);
|
||||||
history.push(`/${roomIdOrAlias.substring(1).split(":")[0]}`);
|
history.push(`/${roomAlias.substring(1).split(":")[0]}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
submit().catch((error) => {
|
submit().catch((error) => {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ describe("CallList", () => {
|
|||||||
|
|
||||||
it("should show room", async () => {
|
it("should show room", async () => {
|
||||||
const rooms = [
|
const rooms = [
|
||||||
{ roomName: "Room #1", roomAlias: "!roomId" },
|
{ roomName: "Room #1", roomAlias: "#room-name:server.org" },
|
||||||
] as GroupCallRoom[];
|
] as GroupCallRoom[];
|
||||||
|
|
||||||
const result = renderComponent(rooms);
|
const result = renderComponent(rooms);
|
||||||
|
|||||||
Reference in New Issue
Block a user