mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Make room alias & user ID links matrix.to links
This commit is contained in:
parent
3a0b63dbda
commit
04c27205a3
1 changed files with 2 additions and 2 deletions
|
@ -126,6 +126,7 @@ matrixLinkify.VECTOR_URL_PATTERN = "^(?:https?:\/\/)?(?:"
|
|||
+ ")(#.*)";
|
||||
|
||||
matrixLinkify.MATRIXTO_URL_PATTERN = "^(?:https?:\/\/)?(?:www\\.)?matrix\\.to/#/((#|@|!).*)";
|
||||
matrixLinkify.MATRIXTO_BASE_URL= "https://matrix.to";
|
||||
|
||||
matrixLinkify.options = {
|
||||
events: function (href, type) {
|
||||
|
@ -148,9 +149,8 @@ matrixLinkify.options = {
|
|||
formatHref: function (href, type) {
|
||||
switch (type) {
|
||||
case 'roomalias':
|
||||
return '#/room/' + href;
|
||||
case 'userid':
|
||||
return '#/user/' + href;
|
||||
return matrixLinkify.MATRIXTO_BASE_URL + '/#/' + href;
|
||||
default:
|
||||
var m;
|
||||
// FIXME: horrible duplication with HtmlUtils' transform tags
|
||||
|
|
Loading…
Reference in a new issue