【发布时间】:2023-03-20 18:41:02
【问题描述】:
我的 Firebase 函数中有一些代码将通知放在一起并将其发送到用户的设备。 但是在它向令牌发送一个通知并交付后,它发送的未来通知不会通过。我知道这不是客户端,我所做的就是打印出数据。这就是我发送通知的方式:
admin.messaging().sendToDevice(recipientToken, payload)
.then(function (response) {
console.log("Successfully sent message:", response);
})
.catch(function (error) {
console.log("Error sending message. Cause: ", error);
});
我是否缺少某种参数或其他东西?
【问题讨论】:
标签: javascript node.js firebase