From 155c4b832281348c16be1f4ef667e6e23dbf1bd8 Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Fri, 27 Aug 2021 18:13:24 +0530 Subject: chore: normalized all recipes to ensure compatibility with es6 (#639) - Removed some calls to set badge with '0' all the time. - Removed all 'sourceMaps' since they are all outdated atm. --- recipes/workplace/index.js | 2 +- recipes/workplace/package.json | 2 +- recipes/workplace/webview.js | 18 +++++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) (limited to 'recipes/workplace') diff --git a/recipes/workplace/index.js b/recipes/workplace/index.js index 258da41..23607bd 100644 --- a/recipes/workplace/index.js +++ b/recipes/workplace/index.js @@ -1 +1 @@ -module.exports = Franz => Franz; +module.exports = Ferdi => Ferdi; diff --git a/recipes/workplace/package.json b/recipes/workplace/package.json index 5be0095..61e317c 100644 --- a/recipes/workplace/package.json +++ b/recipes/workplace/package.json @@ -1,7 +1,7 @@ { "id": "workplace", "name": "Workplace", - "version": "1.2.0", + "version": "1.3.0", "license": "MIT", "config": { "serviceURL": "https://{teamId}.workplace.com/chat", diff --git a/recipes/workplace/webview.js b/recipes/workplace/webview.js index af2af89..e10c449 100644 --- a/recipes/workplace/webview.js +++ b/recipes/workplace/webview.js @@ -1,6 +1,8 @@ -const path = require('path'); +const _path = _interopRequireDefault(require('path')); -module.exports = Franz => { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = Ferdi => { const getMessages = () => { let direct = 0; let indirect = 0; @@ -23,18 +25,20 @@ module.exports = Franz => { } } - Franz.setBadge(direct, indirect); + Ferdi.setBadge(direct, indirect); }; - Franz.injectCSS(path.join(__dirname, 'workplace.css')); - Franz.loop(getMessages); + Ferdi.loop(getMessages); + + Ferdi.injectCSS(_path.default.join(__dirname, 'workplace.css')); + localStorage._cs_desktopNotifsEnabled = JSON.stringify({ __t: new Date().getTime(), __v: true, }); - if (typeof Franz.onNotify === 'function') { - Franz.onNotify(notification => { + if (typeof Ferdi.onNotify === 'function') { + Ferdi.onNotify(notification => { if (typeof notification.title !== 'string') { notification.title = ((notification.title.props || {}).content || [])[0] || 'Work Chat'; } -- cgit v1.2.3-70-g09d2