From 5889132732841ba60968023879ef6367ebb9331d Mon Sep 17 00:00:00 2001 From: Brock Whittaker Date: Thu, 19 Oct 2017 11:29:43 -0700 Subject: [PATCH] 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. --- static/js/notifications.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/notifications.js b/static/js/notifications.js index c14d2a753a..a95b7ef456 100644 --- a/static/js/notifications.js +++ b/static/js/notifications.js @@ -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); };