diff --git a/src/matrix-utils.js b/src/matrix-utils.js index 184372c8..ee8d0649 100644 --- a/src/matrix-utils.js +++ b/src/matrix-utils.js @@ -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}`; } }