Skip to content

Commit 2e241fd

Browse files
authored
Merge pull request element-hq#10196 from vector-im/t3chguy/fix_vector_links
Fix Electron vector: links
2 parents 975f177 + 320f319 commit 2e241fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

electron_app/src/webcontents-handler.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ function onWindowOrNavigate(ev, target) {
3636
}
3737

3838
function onLinkContextMenu(ev, params) {
39-
const url = params.linkURL || params.srcURL;
39+
let url = params.linkURL || params.srcURL;
40+
41+
if (url.startsWith('vector://vector/webapp')) {
42+
url = "https://riot.im/app/" + url.substring(23);
43+
}
4044

4145
const popupMenu = new Menu();
4246
// No point trying to open blob: URLs in an external browser: it ain't gonna work.

0 commit comments

Comments
 (0)