Add protocol to copied room url

This commit is contained in:
Robert Long 2022-02-16 10:52:07 -08:00
parent cb07ce32cb
commit 1cc634509b

View file

@ -120,12 +120,12 @@ export function getRoomUrl(roomId) {
const [localPart, host] = roomId.replace("#", "").split(":");
if (host !== defaultHomeserverHost) {
return `${window.location.host}/room/${roomId}`;
return `${window.location.protocol}//${window.location.host}/room/${roomId}`;
} else {
return `${window.location.host}/${localPart}`;
return `${window.location.protocol}//${window.location.host}/${localPart}`;
}
} else {
return `${window.location.host}/room/${roomId}`;
return `${window.location.protocol}//${window.location.host}/room/${roomId}`;
}
}