From 1cc634509b617b20f5655ad3b832f92ca05eca48 Mon Sep 17 00:00:00 2001 From: Robert Long Date: Wed, 16 Feb 2022 10:52:07 -0800 Subject: [PATCH] Add protocol to copied room url --- src/matrix-utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/matrix-utils.js b/src/matrix-utils.js index 184372c..ee8d064 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}`; } }