From 5d78418530f9c2f90638ee567a45c2cc3c2616c9 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 21 Dec 2020 13:15:00 +0000 Subject: [PATCH] Recognise *.element.io links as Element permalinks This ensures all Elements detect permalinks to official deployments as Element and handle them internally. Fixes https://github.com/vector-im/element-web/issues/16005 --- src/linkify-matrix.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/linkify-matrix.js b/src/linkify-matrix.js index bee8e95137..1a40fde26f 100644 --- a/src/linkify-matrix.js +++ b/src/linkify-matrix.js @@ -188,7 +188,8 @@ const escapeRegExp = function(string) { matrixLinkify.ELEMENT_URL_PATTERN = "^(?:https?://)?(?:" + escapeRegExp(window.location.host + window.location.pathname) + "|" + - "(?:www\\.)?(?:riot|vector)\\.im/(?:app|beta|staging|develop)/" + + "(?:www\\.)?(?:riot|vector)\\.im/(?:app|beta|staging|develop)/|" + + "(?:app|beta|staging|develop)\\.element\\.io/" + ")(#.*)"; matrixLinkify.MATRIXTO_URL_PATTERN = "^(?:https?://)?(?:www\\.)?matrix\\.to/#/(([#@!+]).*)";