From d0c716d61c07666deb5bc5455705120e20f4f547 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 8 Sep 2020 10:26:37 +0100 Subject: [PATCH] Fix permalink local linkification to not strip via servers --- src/utils/permalinks/Permalinks.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/permalinks/Permalinks.js b/src/utils/permalinks/Permalinks.js index 466d1ed57d..d97ba55c4d 100644 --- a/src/utils/permalinks/Permalinks.js +++ b/src/utils/permalinks/Permalinks.js @@ -332,6 +332,10 @@ export function tryTransformPermalinkToLocalHref(permalink: string): string { if (permalinkParts.roomIdOrAlias) { const eventIdPart = permalinkParts.eventId ? `/${permalinkParts.eventId}` : ''; permalink = `#/room/${permalinkParts.roomIdOrAlias}${eventIdPart}`; + if (permalinkParts.viaServers.length > 0) { + const riotPermalinkConstructor = new SpecPermalinkConstructor(); + permalink += riotPermalinkConstructor.encodeServerCandidates(permalinkParts.viaServers); + } } else if (permalinkParts.groupId) { permalink = `#/group/${permalinkParts.groupId}`; } else if (permalinkParts.userId) {