Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: accept explicit null calendar attendee snapshots (#8838)

[._.]/ Adam Eivy71f874b83fd5
diff --git a/server/routes/calendar.js b/server/routes/calendar.js
index d0a6292968..610649d22a 100644
--- a/server/routes/calendar.js
+++ b/server/routes/calendar.js
@@ -92,7 +92,7 @@ const pushSyncSchema = z.object({
email: z.string().optional(),
self: z.boolean().optional(),
responseStatus: z.string().optional()
- })).optional(),
+ })).nullable().optional(),
// Conference metadata feeds the cached `meetingUrl` join link (#6289).
// OPTIONAL with no default, and nullable: `selectMeetingUrl` distinguishes
// a producer that omitted them (preserve the cached link) from one that
diff --git a/server/routes/calendar.test.js b/server/routes/calendar.test.js
index ddfd9f9356..814fcea2a7 100644
--- a/server/routes/calendar.test.js
+++ b/server/routes/calendar.test.js
@@ -320,13 +320,14 @@ describe('Calendar Routes — push sync carries Google conference metadata (#628
...baseEvent,
organizer: { email: '[email protected]', displayName: 'Example Organizer', self: true, privateNote: 'discard' },
attendees: [{ email: '[email protected]', self: true, responseStatus: 'declined', privateNote: 'discard' }],
- }, { ...baseEvent, id: 'clear', organizer: null, attendees: [] }, baseEvent]);
+ }, { ...baseEvent, id: 'clear', organizer: null, attendees: [] }, baseEvent, { ...baseEvent, id: 'null-attendees', attendees: null }]);
expect(response.status).toBe(200);
expect(pushedEvents()[0].organizer).toEqual({ email: '[email protected]', displayName: 'Example Organizer', self: true });
expect(pushedEvents()[0].attendees).toEqual([{ email: '[email protected]', self: true, responseStatus: 'declined' }]);
expect(pushedEvents()[1]).toMatchObject({ organizer: null, attendees: [] });
expect(pushedEvents()[2]).not.toHaveProperty('organizer');
expect(pushedEvents()[2]).not.toHaveProperty('attendees');
+ expect(pushedEvents()[3].attendees).toBeNull();
});
it.each([{ organizer: 'invalid' }, { attendees: [{ self: 'yes' }] }])('rejects malformed participant types: %j', async fields => {