Testing firebase messaging properties.

This commit is contained in:
Patrick Fic
2020-07-22 16:55:48 -07:00
parent 48b62279b7
commit ffedc41c26
4 changed files with 90 additions and 55 deletions

View File

@@ -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);