From a57a4edcb648d025254ede4d18d267b887ad0b8b Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sun, 5 Sep 2021 15:14:28 +0530 Subject: Remove dependency on 'require' of 'electron' and 'electron/remote' modules. Instead, use the exposed content from the recipe model in main ferdi. --- recipes/rocketchat/webview.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'recipes/rocketchat/webview.js') diff --git a/recipes/rocketchat/webview.js b/recipes/rocketchat/webview.js index d3d0a27..4240935 100644 --- a/recipes/rocketchat/webview.js +++ b/recipes/rocketchat/webview.js @@ -1,5 +1,3 @@ -const { ipcRenderer } = require('electron'); - const getTeamIcon = function getTeamIcon() { const manifestElement = document.querySelector('link[rel="manifest"]'); @@ -23,7 +21,7 @@ const getTeamIcon = function getTeamIcon() { const response = JSON.parse(this.responseText); if (response.icons.length >= 1) { - ipcRenderer.sendToHost( + Ferdi.ipcRenderer.sendToHost( 'avatar', `${window.location.protocol}//${window.location.host}${response.icons[0].src}`, ); -- cgit v1.2.3-70-g09d2