From e7515d7d3a8199d63ba1941f585dcc52dacfe013 Mon Sep 17 00:00:00 2001 From: Sharon Dcruz Date: Tue, 29 Jul 2025 13:13:11 +0530 Subject: [PATCH] Changes Updated --- functions/src/notifications/processNotification.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/functions/src/notifications/processNotification.ts b/functions/src/notifications/processNotification.ts index 8d38599..e952fb0 100644 --- a/functions/src/notifications/processNotification.ts +++ b/functions/src/notifications/processNotification.ts @@ -9,8 +9,6 @@ const logger = getLogger(); interface NotificationData { senderId?: string; recipientId?: string; - ownerId?: string; - trainerId?: string; type?: string; notificationSent?: boolean; timestamp?: admin.firestore.FieldValue; @@ -84,14 +82,6 @@ async function getUserAndFCMToken( if (notification.recipientId) { targetUserId = notification.recipientId; logger.info(`Using top-level recipientId: ${targetUserId}`); - } else if (notification.ownerId) { - targetUserId = notification.ownerId; - logger.info(`Using top-level ownerId: ${targetUserId}`); - - } else if (notification.trainerId) { - targetUserId = notification.trainerId; - logger.info(`Using top-level trainerId: ${targetUserId}`); - } else if (notification.data?.userId) { targetUserId = notification.data.userId; logger.info(`Using data.userId: ${targetUserId}`); @@ -171,8 +161,6 @@ function prepareNotificationMessage( if (notification.senderId) fcmData.senderId = notification.senderId; if (notification.recipientId) fcmData.recipientId = notification.recipientId; - if (notification.ownerId) fcmData.ownerId = notification.ownerId; - if (notification.trainerId) fcmData.trainerId = notification.trainerId; if (notification.read !== undefined) fcmData.read = String(notification.read); if (notification.data) {