aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-client/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-client/src')
-rw-r--r--packages/meshbay-client/src/main.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/meshbay-client/src/main.js b/packages/meshbay-client/src/main.js
index b602950..b77022e 100644
--- a/packages/meshbay-client/src/main.js
+++ b/packages/meshbay-client/src/main.js
@@ -682,8 +682,10 @@ function createWindow() {
win.webContents.on('will-navigate', (event, target) => {
if (!isOurs(target)) event.preventDefault();
});
+ // `mailto:` goes to the system's mail application too: the recovery screen
+ // has the person mail their key to themselves (docs/MESHBAY_DESIGN.md §3.6).
win.webContents.setWindowOpenHandler(({ url }) => {
- if (/^https?:$/.test(new URL(url).protocol)) shell.openExternal(url);
+ if (/^(https?|mailto):$/.test(new URL(url).protocol)) shell.openExternal(url);
return { action: 'deny' };
});
// Deny by default, with one exception, and the exception is the point of the