From 199dfa7bf91a00c2668e1209a84bd6d4b9f1300e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 30 Sep 2019 16:04:49 -0600 Subject: [PATCH] Always check if the permalink is a spec permalink See code for rationale --- src/utils/permalinks/RoomPermalinkCreator.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/permalinks/RoomPermalinkCreator.js b/src/utils/permalinks/RoomPermalinkCreator.js index 88bcd5768a..7df204a17b 100644 --- a/src/utils/permalinks/RoomPermalinkCreator.js +++ b/src/utils/permalinks/RoomPermalinkCreator.js @@ -280,6 +280,9 @@ export function makeGroupPermalink(groupId) { } export function isPermalinkHost(host: string): boolean { + // Always check if the permalink is a spec permalink (callers are likely to call + // parsePermalink after this function). + if (new SpecPermalinkConstructor().isPermalinkHost(host)) return true; return getPermalinkConstructor().isPermalinkHost(host); }