From cdaab2cb475948261b263718f9c01fb2538ac0d9 Mon Sep 17 00:00:00 2001 From: Noah Gregory Date: Sat, 20 Feb 2021 23:19:11 -0500 Subject: [PATCH] Adjusted permission check Since late 2019, getToken() has automatically requested permission, so no need to check if it is granted here --- src/messaging/messaging.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/messaging/messaging.ts b/src/messaging/messaging.ts index b8006314f..dedd2f322 100644 --- a/src/messaging/messaging.ts +++ b/src/messaging/messaging.ts @@ -81,7 +81,7 @@ export class AngularFireMessaging { subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(async messaging => { - if (firebase.messaging.isSupported() && Notification.permission === 'granted') { + if (firebase.messaging.isSupported() && Notification.permission !== 'denied') { if (firebaseLTv8) { return await messaging.getToken(); } else {