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/webview.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'recipes/workplace/webview.js') 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