Skip to content

Commit fa8292e

Browse files
authored
Bump firabse to latest 10.10.0 version (#1015)
1 parent e1c8478 commit fa8292e

File tree

3 files changed

+426
-649
lines changed

3 files changed

+426
-649
lines changed

internal/playground-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"vite": "^4.5.3"
1313
},
1414
"dependencies": {
15-
"firebase": "^9.22.0",
15+
"firebase": "^10.10.0",
1616
"pako": "^2.1.0"
1717
}
1818
}

internal/playground-js/src/fabric-callee/index.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,9 @@ window.disconnect = async () => {
270270
window.tapPushNotification = async () => {
271271
try {
272272
const pnKey = document.getElementById('pn-key').value
273-
const pushNotificationPayload = JSON.parse(payload.value)
274-
const result = await readPushNotification(pushNotificationPayload, pnKey)
273+
const pnPayload = JSON.parse(payload.value)
274+
const { body } = pnPayload.notification
275+
const result = await readPushNotification(body, pnKey)
275276
console.log('PN', result)
276277
const { resultType, resultObject } = await client.handlePushNotification(
277278
result
@@ -712,9 +713,10 @@ window.enablePushNotifications = async () => {
712713

713714
onMessage(messaging, (payload) => {
714715
console.log('Push payload', payload)
715-
document.getElementById('payload').value = payload.notification.body
716-
const body = JSON.parse(payload.notification.body || '{}')
717-
alert(body.title)
716+
const message = JSON.parse(payload.data.message || '{}')
717+
document.getElementById('payload').value = payload.data.message
718+
const messageBody = message.notification.body
719+
alert(messageBody.title)
718720
})
719721

720722
try {

0 commit comments

Comments
 (0)