TF-1278 Hide notification on background web browser when support fcm
This commit is contained in:
@@ -11,3 +11,9 @@ firebase.initializeApp({
|
||||
appId: "...",
|
||||
});
|
||||
const messaging = firebase.messaging();
|
||||
|
||||
messaging.setBackgroundMessageHandler(function(payload) {
|
||||
console.log('[firebase-messaging-sw.js] Received background message ', payload);
|
||||
self.registration.hideNotification();
|
||||
return null;
|
||||
});
|
||||
Reference in New Issue
Block a user