notifications: Remove test for "webkit" in userAgent.

This removes a test for "webkit" in the userAgent string in order
to see whether notifications should be displayed. This is so that
the notifications process will work correctly in Firefox and not
keep registering as "false" which makes the notifications prompt
continue to re-show itself.
This commit is contained in:
Brock Whittaker 2017-10-19 11:29:43 -07:00 committed by Tim Abbott
parent 1698f979d0
commit 5889132732
1 changed files with 5 additions and 1 deletions

View File

@ -471,7 +471,11 @@ function should_send_audible_notification(message) {
}
exports.granted_desktop_notifications_permission = function () {
return browser_desktop_notifications_on();
return (notifications_api &&
// 0 is PERMISSION_ALLOWED
notifications_api.checkPermission() === 0) ||
// window.bridge is the legacy desktop app
(window.bridge !== undefined);
};