mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-05 19:59:20 +00:00
make sure roomAlias = null in widget mode
Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
@@ -224,8 +224,12 @@ export function getRoomIdentifierFromUrl(
|
|||||||
roomAlias = pathname.substring(1); // Strip the "/"
|
roomAlias = pathname.substring(1); // Strip the "/"
|
||||||
|
|
||||||
// Delete "/room/", if present
|
// Delete "/room/", if present
|
||||||
if (roomAlias.startsWith("room/")) {
|
if (roomAlias.startsWith("room")) {
|
||||||
roomAlias = roomAlias.substring("room/".length);
|
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
|
// Add "#", if not present
|
||||||
if (!roomAlias.startsWith("#")) {
|
if (!roomAlias.startsWith("#")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user