Factor out common function to generate the URLs

This commit is contained in:
David Baker
2023-09-19 18:55:33 +01:00
parent 2753f04f0b
commit 83fdb094d5
6 changed files with 43 additions and 15 deletions

View File

@@ -23,6 +23,7 @@ import { Heading } from "@vector-im/compound-web";
import {
createRoom,
getRelativeRoomUrl,
roomAliasLocalpartFromRoomName,
sanitiseRoomNameInput,
} from "../matrix-utils";
@@ -86,7 +87,7 @@ export function RegisteredView({ client }: Props) {
);
}
history.push(`/room/#?roomId=${roomId}`);
history.push(getRelativeRoomUrl(roomId, roomName));
}
submit().catch((error) => {