aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/slack
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-09-05 15:14:28 +0530
committerLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-09-05 18:00:26 +0530
commita57a4edcb648d025254ede4d18d267b887ad0b8b (patch)
treec8b75e58cf108a55608f729218885abdb07fd42d /recipes/slack
parentAdd ability to use self-hosted option for 'youtrack' service (fixes #671) (diff)
downloadferdium-recipes-a57a4edcb648d025254ede4d18d267b887ad0b8b.tar.gz
ferdium-recipes-a57a4edcb648d025254ede4d18d267b887ad0b8b.tar.zst
ferdium-recipes-a57a4edcb648d025254ede4d18d267b887ad0b8b.zip
Remove dependency on 'require' of 'electron' and 'electron/remote' modules.
Instead, use the exposed content from the recipe model in main ferdi.
Diffstat (limited to 'recipes/slack')
-rw-r--r--recipes/slack/package.json2
-rw-r--r--recipes/slack/webview.js4
2 files changed, 2 insertions, 4 deletions
diff --git a/recipes/slack/package.json b/recipes/slack/package.json
index 1c5de53..7c87e93 100644
--- a/recipes/slack/package.json
+++ b/recipes/slack/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "slack", 2 "id": "slack",
3 "name": "Slack", 3 "name": "Slack",
4 "version": "1.2.0", 4 "version": "1.3.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://{teamId}.slack.com", 7 "serviceURL": "https://{teamId}.slack.com",
diff --git a/recipes/slack/webview.js b/recipes/slack/webview.js
index b8e3817..1a12e80 100644
--- a/recipes/slack/webview.js
+++ b/recipes/slack/webview.js
@@ -1,5 +1,3 @@
1const _electron = require('electron');
2
3const _path = _interopRequireDefault(require('path')); 1const _path = _interopRequireDefault(require('path'));
4 2
5function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -27,7 +25,7 @@ const getTeamIcon = function getTeamIcon(count = 0) {
27 countTeamIconCheck += 1; 25 countTeamIconCheck += 1;
28 26
29 if (bgUrl) { 27 if (bgUrl) {
30 _electron.ipcRenderer.sendToHost('avatar', bgUrl); 28 Ferdi.ipcRenderer.sendToHost('avatar', bgUrl);
31 } else if (countTeamIconCheck <= 5) { 29 } else if (countTeamIconCheck <= 5) {
32 setTimeout(() => { 30 setTimeout(() => {
33 getTeamIcon(countTeamIconCheck + 1); 31 getTeamIcon(countTeamIconCheck + 1);