Hello,
I try to send a push from my timer with JS code. I have this for the push Request
const templateName = 'orderChatTeamTemplate';
const templateValues = {
channelName: 'orderStatusProvider',
message: message,
userId: user.userId,
// Utilisateur qui reçoit la notification
linkedClientId: user.userId,
linkedProviderId: provider.id,
eventId: order.id,
orderId: order.id,
isForClient: false,
senderName: '',
// Si nécessaire, tu peux spécifier un nom ici
channelId: 'ORDER_CHANNEL' // Assure-toi que ce channelId est correct
};
console.log('Before push request 4');
// Envoyer la notification avec le template
Backendless.Messaging.pushWithTemplate(templateName, templateValues)
.then(function(messageStatus) {
console.log(`Push notification sent successfully for Order ID: ${order.objectId} to User ID: ${linkedClient.userId}`);
})
.catch(function(error) {
console.error(`Error sending push notification for Order ID ${order.objectId}:`, error);
});
I see the console log with “Before push request 4” but I didn’t see the
console.log(Push notification sent successfully for Order ID: ${order.objectId} to User ID: ${linkedClient.userId}
);
and I don’t receive the push. But I can’t see why.
The templates values are ok and I send a push to the userId.
My device token is well registered.
Is it possible to debug this situation?
Thanks you