Skip to content

Commit

Permalink
Allow reply notifications on Mac OS
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigok committed Jan 24, 2017
1 parent 452e1d1 commit 5131d41
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@paulcbetts/system-idle-time": "^1.0.4",
"spellchecker": "^3.3.1",
"lodash": "^4.17.4",
"node-mac-notifier": "0.0.13",
"electron-rebuild": "^1.5.7"
},
"devDependencies": {
Expand Down
12 changes: 11 additions & 1 deletion src/public/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

const { ipcRenderer } = require('electron');

class Notification extends window.Notification {
const NodeNotification = require('node-mac-notifier');

class Notification extends NodeNotification {

constructor (title, options) {
super(title, options);
Expand All @@ -25,6 +27,14 @@ class Notification extends window.Notification {
};
return result;
}

static requestPermission () {
return;
}

static get permission () {
return 'granted';
}
}

window.Notification = Notification;
Expand Down

0 comments on commit 5131d41

Please sign in to comment.