Testing firebase messaging properties.
This commit is contained in:
@@ -63,6 +63,12 @@ export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
|
||||
|
||||
messaging.onMessage((payload) => {
|
||||
console.log("**********UTILS Message received. ", payload);
|
||||
navigator.serviceWorker.getRegistration().then((registration) => {
|
||||
return registration.showNotification(
|
||||
payload.notification.title + "from utils",
|
||||
payload.notification
|
||||
);
|
||||
});
|
||||
// [START_EXCLUDE]
|
||||
// Update the UI to include the received message.
|
||||
//appendMessage(payload);
|
||||
|
||||
Reference in New Issue
Block a user