master^2
Bhaskar 8 months ago
parent 27f284265e
commit dc57ddb153

@ -2394,7 +2394,7 @@ const sendNotification = async (customerId, fcmIds, title, body) => {
const now = new Date(); const now = new Date();
const lastSent = new Date(lastNotificationSent || 0); const lastSent = new Date(lastNotificationSent || 0);
// If preference is not "always", check the timing // If preference is not "always", check the timing
// if (notificationPreference !== "always") { // if (notificationPreference !== "always") {
// let minInterval = 0; // let minInterval = 0;
@ -2418,7 +2418,7 @@ const sendNotification = async (customerId, fcmIds, title, body) => {
// } // }
// Send notifications // Send notifications
const notificationPromises = validTokens.map(async (token) => { const notificationPromises = flatTokens.map(async (token) => {
try { try {
const response = await admin.messaging().send({ const response = await admin.messaging().send({
notification: { title, body }, notification: { title, body },

Loading…
Cancel
Save