This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -132,9 +132,9 @@ const escapeRegExp = function(string): string {
132
132
} ;
133
133
134
134
// Recognise URLs from both our local and official Element deployments.
135
- // Anyone else really should be using matrix.to.
135
+ // Anyone else really should be using matrix.to. vector:// allowed to support Element Desktop relative links.
136
136
export const ELEMENT_URL_PATTERN =
137
- "^(?:https?://)?(?:" +
137
+ "^(?:vector://| https?://)?(?:" +
138
138
escapeRegExp ( window . location . host + window . location . pathname ) + "|" +
139
139
"(?:www\\.)?(?:riot|vector)\\.im/(?:app|beta|staging|develop)/|" +
140
140
"(?:app|beta|staging|develop)\\.element\\.io/" +
Original file line number Diff line number Diff line change @@ -362,7 +362,11 @@ export function tryTransformEntityToPermalink(entity: string): string {
362
362
* @returns {string } The transformed permalink or original URL if unable.
363
363
*/
364
364
export function tryTransformPermalinkToLocalHref ( permalink : string ) : string {
365
- if ( ! permalink . startsWith ( "http:" ) && ! permalink . startsWith ( "https:" ) && ! permalink . startsWith ( "matrix:" ) ) {
365
+ if ( ! permalink . startsWith ( "http:" ) &&
366
+ ! permalink . startsWith ( "https:" ) &&
367
+ ! permalink . startsWith ( "matrix:" ) &&
368
+ ! permalink . startsWith ( "vector:" ) // Element Desktop
369
+ ) {
366
370
return permalink ;
367
371
}
368
372
You can’t perform that action at this time.
0 commit comments