Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
FIX: Don't support push notification if web notification is not enabled.
Browse files Browse the repository at this point in the history
* In Firefox, web notifications can be disabled by setting
  `dom.webnotifications.enabled` to `false`.
  • Loading branch information
tgxworld committed Mar 21, 2018
1 parent aac3e3d commit 8e217c4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions assets/javascripts/discourse/lib/push-notifications.js.es6
Expand Up @@ -24,6 +24,7 @@ function userAgentVersionChecker(agent, version, mobileView) {
export function isPushNotificationsSupported(mobileView) {
if (!(('serviceWorker' in navigator) &&
(ServiceWorkerRegistration &&
(typeof(Notification) !== "undefined") &&
('showNotification' in ServiceWorkerRegistration.prototype) &&
('PushManager' in window)))) {

Expand Down

0 comments on commit 8e217c4

Please sign in to comment.