Я создаю приложение NodeJs, которое отправляет уведомления на несколько платформ устройств: Android и iOS. У меня проблема с тем, что когда я вызываю метод sentToDevices (argToken, argPayload, argOptions), он запускается дважды.
admin.messaging().sendToDevice(arrTokens, messagePayload, {dryRun: true})
.then(devicesResponse => {
console.log('Notifications send'); *// this code will print twice on the console*
}).catch(error => {
console.log('An error occurred while sending notification');
})