aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSaúl Ibarra Corretgé <s@saghul.net>2023-03-07 13:38:18 +0100
committerSaúl Ibarra Corretgé <s@saghul.net>2023-03-07 15:14:46 +0100
commita261fd46bc6c7d4804aa83e3f327fa59cc52bcb3 (patch)
tree1f132474d681adfef062853a070323811f617112 /app
parentff731914446169ff860f9f2d8cc9a87c4dfdb675 (diff)
feat(reload) refactor opening external links
Use IPC to send a message to the main process instead of opening them from the renderer process.
Diffstat (limited to 'app')
-rw-r--r--app/preload/preload.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/preload/preload.js b/app/preload/preload.js
index 0f386c1..e68ea53 100644
--- a/app/preload/preload.js
+++ b/app/preload/preload.js
@@ -5,11 +5,20 @@ const { RemoteControl,
initPopupsConfigurationRender,
setupPowerMonitorRender
} = require('@jitsi/electron-sdk');
-const { openExternalLink } = require('../features/utils/openExternalLink');
const whitelistedIpcChannels = [ 'protocol-data-msg', 'renderer-ready' ];
/**
+ * Open an external URL.
+ *
+ * @param {string} url - The URL we with to open.
+ * @returns {void}
+ */
+function openExternalLink(url) {
+ ipcRenderer.send('jitsi-open-url', url);
+}
+
+/**
* Setup the renderer process.
*
* @param {*} api - API object.