Include the room name in the generated URL

This commit is contained in:
David Baker
2023-09-19 18:23:44 +01:00
parent 728e37b23c
commit 2753f04f0b
5 changed files with 30 additions and 17 deletions

View File

@@ -345,10 +345,14 @@ export async function createRoom(
* @param password
* @returns
*/
export function getRoomUrl(roomId: string, password?: string): string {
return `${window.location.protocol}//${
window.location.host
}/room/#?roomId=${roomId}${password ? "&" + PASSWORD_STRING + password : ""}`;
export function getRoomUrl(
roomId: string,
roomName?: string,
password?: string
): string {
return `${window.location.protocol}//${window.location.host}/#${
roomName ? "/" + roomAliasLocalpartFromRoomName(roomName) : ""
}?roomId=${roomId}${password ? "&" + PASSWORD_STRING + password : ""}`;
}
export function getAvatarUrl(