make sure roomAlias = null in widget mode

Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Timo K
2023-10-02 21:31:24 +02:00
parent f779bc26cd
commit 309d2e7c96

View File

@@ -224,8 +224,12 @@ export function getRoomIdentifierFromUrl(
roomAlias = pathname.substring(1); // Strip the "/"
// Delete "/room/", if present
if (roomAlias.startsWith("room/")) {
roomAlias = roomAlias.substring("room/".length);
if (roomAlias.startsWith("room")) {
roomAlias = roomAlias.substring("room".length);
}
// We separate `room` and `/` because in widget mode we use room without providing an alias `.../room#?...`
if (roomAlias.startsWith("/")) {
roomAlias = roomAlias.substring("/".length);
}
// Add "#", if not present
if (!roomAlias.startsWith("#")) {