Filter by RSVP Status
What it does: Blocks calendar invitations you haven't accepted — anything you've declined or not yet responded to is kept off the synced calendar.
Use case: Your calendar fills up with invitations you never accepted. This keeps your synced calendar limited to events you've actually committed to.
function gate(event: GateEvent): GateResult {
if (
event.responseStatus === 'declined' ||
event.responseStatus === 'needsAction'
) {
return { pass: false, reason: 'Invitation not accepted' };
}
return { pass: true };
}
How It Works
The responseStatus property holds your own response to the event (the response on the connected source calendar), not the responses of other attendees. It is one of:
accepted— you accepted the invitationdeclined— you declined the invitationtentative— you responded "maybe"needsAction— you were invited but have not responded yetorganizer— you created/organize the eventnull— you are not an attendee (e.g. a personal event with no invitees), or the source calendar does not expose a response
The recipe above passes accepted, tentative, organizer, and null events, and blocks declined and needsAction.
Customization
Only sync events you've firmly accepted (also drop "maybe"):
function gate(event: GateEvent): GateResult {
if (
event.responseStatus === 'accepted' ||
event.responseStatus === 'organizer'
) {
return { pass: true };
}
return { pass: false, reason: 'Not a confirmed commitment' };
}
This intentionally blocks null events too, so personal events with no invitees won't sync. Drop the organizer check or add || event.responseStatus === null if that's not what you want.
Only sync events you organize:
function gate(event: GateEvent): GateResult {
if (event.responseStatus === 'organizer') {
return { pass: true };
}
return { pass: false, reason: 'Not organized by me' };
}
Related
- Property Reference — how each provider maps onto
responseStatus. - Filter Cancelled Events — remove events cancelled by the organizer.