From 93e24fae7a5b109dc5b53afdcbe73789e777bc81 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/#/(([#@!+]).*)";