new changes

This commit is contained in:
Aravind U. S 2025-04-07 22:37:07 +05:30
parent f8803c4ff4
commit 059ad389ee

View File

@ -486,18 +486,18 @@ export const sendFCMNotificationByType = onRequest({
break; break;
case 'client_invitations': case 'client_invitations':
const isAccept = notification.status === 'ACCEPTED'; const isAccept = notification.status === 'ACCEPTED';
title = isAccept ? 'Invitation Accepted' : 'Invitation Rejected'; title = isAccept ? 'Invitation Accepted' : 'Invitation Rejected';
body = notification.message || (isAccept ? data.gymName = notification.gymName || '';
`The invitation you shared has been accepted` : data.clientEmail = notification.clientEmail || '';
`The invitation you shared has been rejected`); data.clientName = notification.name || '';
data.gymName = notification.gymName || ''; data.invitationId = notification.invitationId || '';
data.clientEmail = notification.clientEmail || ''; data.subcriptionname = notification.subcriptionName || '';
data.clientName = notification.name || ''; body = notification.message || (isAccept ?
data.invitationId = notification.invitationId || ''; `The invitation for ${notification.subcriptionName} you shared with ${notification.name} has been accepted` :
data.subcriptionname= notification.subcriptionname || ''; `The invitation for ${notification.subcriptionName} you shared with ${notification.name} has been rejected`);
break; break;
default: default:
logger.info(`Using default handling for notification type: ${notification.type}`); logger.info(`Using default handling for notification type: ${notification.type}`);
break; break;