mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-03 07:10:26 +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 "/"
|
||||
|
||||
// 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("#")) {
|
||||
|
||||
Reference in New Issue
Block a user