mirror of https://github.com/zulip/zulip.git
notifications: Use NotificationAPI for permission_state.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
f277eb022c
commit
549ed3913c
|
@ -91,12 +91,12 @@ function update_notification_sound_source() {
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.permission_state = function () {
|
exports.permission_state = function () {
|
||||||
if (window.Notification === undefined) {
|
if (NotificationAPI === undefined) {
|
||||||
// act like notifications are blocked if they do not have access to
|
// act like notifications are blocked if they do not have access to
|
||||||
// the notification API.
|
// the notification API.
|
||||||
return "denied";
|
return "denied";
|
||||||
}
|
}
|
||||||
return window.Notification.permission;
|
return NotificationAPI.permission;
|
||||||
};
|
};
|
||||||
|
|
||||||
let new_message_count = 0;
|
let new_message_count = 0;
|
||||||
|
|
Loading…
Reference in New Issue