Permalink
Browse files

🚑 "BusService.isMasterTab is not a function" error fixed. Request for…

… show notifications added.
  • Loading branch information...
RafiZz committed Jan 11, 2019
1 parent 0386cbc commit 86c81f8a1f6c2173a16c36f1469cf0f33ae05646
Showing with 6 additions and 1 deletion.
  1. +6 −1 web_debranding/static/src/js/native_notifications.js
@@ -15,8 +15,13 @@ odoo.define('web_debranding.native_notifications', function (require) {
if (title === _t('Yay, push notifications are enabled!') || title === _t('Permission denied')) {
content = content.replace(/Odoo/ig, odoo.debranding_new_name);
}

if (window.Notification && Notification.permission === "default") {
Notification.requestPermission();
}

if (window.Notification && Notification.permission === "granted") {
if (BusService.isMasterTab()) {
if (this.isMasterTab()) {
this._sendNativeNotification(title, content, callback);
}
} else {

0 comments on commit 86c81f8

Please sign in to comment.