Merge branch 'master-AIO' into feature/IO-3020-IO-3036-imex-lite-rome-lite
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Scripts for firebase and firebase messaging
|
||||
importScripts("https://www.gstatic.com/firebasejs/8.2.0/firebase-app.js");
|
||||
importScripts("https://www.gstatic.com/firebasejs/8.2.0/firebase-messaging.js");
|
||||
importScripts("https://www.gstatic.com/firebasejs/10.14.1/firebase-app-compat.js");
|
||||
importScripts("https://www.gstatic.com/firebasejs/10.14.1/firebase-messaging-compat.js");
|
||||
|
||||
// Initialize the Firebase app in the service worker by passing the generated config
|
||||
let firebaseConfig;
|
||||
@@ -14,7 +14,7 @@ switch (this.location.hostname) {
|
||||
storageBucket: "imex-dev.appspot.com",
|
||||
messagingSenderId: "759548147434",
|
||||
appId: "1:759548147434:web:e8239868a48ceb36700993",
|
||||
measurementId: "G-K5XRBVVB4S",
|
||||
measurementId: "G-K5XRBVVB4S"
|
||||
};
|
||||
break;
|
||||
case "test.imex.online":
|
||||
@@ -24,7 +24,7 @@ switch (this.location.hostname) {
|
||||
projectId: "imex-test",
|
||||
storageBucket: "imex-test.appspot.com",
|
||||
messagingSenderId: "991923618608",
|
||||
appId: "1:991923618608:web:633437569cdad78299bef5",
|
||||
appId: "1:991923618608:web:633437569cdad78299bef5"
|
||||
// measurementId: "${config.measurementId}",
|
||||
};
|
||||
break;
|
||||
@@ -38,7 +38,7 @@ switch (this.location.hostname) {
|
||||
storageBucket: "imex-prod.appspot.com",
|
||||
messagingSenderId: "253497221485",
|
||||
appId: "1:253497221485:web:3c81c483b94db84b227a64",
|
||||
measurementId: "G-NTWBKG2L0M",
|
||||
measurementId: "G-NTWBKG2L0M"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -49,8 +49,6 @@ const messaging = firebase.messaging();
|
||||
|
||||
messaging.onBackgroundMessage(function (payload) {
|
||||
// Customize notification here
|
||||
const channel = new BroadcastChannel("imex-sw-messages");
|
||||
channel.postMessage(payload);
|
||||
|
||||
//self.registration.showNotification(notificationTitle, notificationOptions);
|
||||
console.log("[firebase-messaging-sw.js] Received background message ", payload);
|
||||
self.registration.showNotification(notificationTitle, notificationOptions);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user