aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/preload/preload.js11
-rw-r--r--main.js7
2 files changed, 17 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.
diff --git a/main.js b/main.js
index 171fc08..9ddca84 100644
--- a/main.js
+++ b/main.js
@@ -416,3 +416,10 @@ ipcMain.on('renderer-ready', () => {
.send('protocol-data-msg', protocolDataForFrontApp);
}
});
+
+/**
+ * Handle opening external links in the main process.
+ */
+ipcMain.on('jitsi-open-url', (event, someUrl) => {
+ openExternalLink(someUrl);
+});