mirror of
https://github.com/urosran/cally.git
synced 2025-07-17 02:25:10 +00:00
notification update
This commit is contained in:
@ -24,6 +24,11 @@ exports.sendNotificationOnEventCreation = functions.firestore
|
||||
const eventData = snapshot.data();
|
||||
const { familyId, creatorId, email, title } = eventData;
|
||||
|
||||
if (!!eventData?.externalOrigin) {
|
||||
console.log('Externally synced event, ignoring.')
|
||||
return;
|
||||
}
|
||||
|
||||
if (!familyId || !creatorId) {
|
||||
console.error('Missing familyId or creatorId in event data');
|
||||
return;
|
||||
@ -636,7 +641,8 @@ async function fetchAndSaveGoogleEvents({ token, refreshToken, email, familyId,
|
||||
allDay: !item.start?.dateTime,
|
||||
familyId,
|
||||
email,
|
||||
creatorId, // Add creatorId to each event
|
||||
creatorId,
|
||||
externalOrigin: "google",
|
||||
};
|
||||
events.push(googleEvent);
|
||||
console.log(`Processed event: ${JSON.stringify(googleEvent)}`);
|
||||
|
Reference in New Issue
Block a user