Javascript 如何从服务器使用FCM向用户发送推送通知?
我的云函数中有一个https.onCall函数。我想在用户调用函数时向用户发送推送通知。Firebase文档对我没有帮助Javascript 如何从服务器使用FCM向用户发送推送通知?,javascript,firebase,firebase-cloud-messaging,google-cloud-functions,Javascript,Firebase,Firebase Cloud Messaging,Google Cloud Functions,我的云函数中有一个https.onCall函数。我想在用户调用函数时向用户发送推送通知。Firebase文档对我没有帮助 exports.bookRoom = functions.https.onCall((data, context) => { if (context.auth.token.teacher === true || context.auth.token.admin === true) { // here i want to send notificatio
exports.bookRoom = functions.https.onCall((data, context) => {
if (context.auth.token.teacher === true || context.auth.token.admin === true) {
// here i want to send notification to the client
}
});