Fix invited events hidden by calendar visibility filter

Invited events belong to the inviter's calendar, which doesn't exist
in the invitee's calendar list. The visibleCalendarIds filter was
removing them. Now invited events bypass this filter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kyle 2026-03-16 13:36:55 +08:00
parent 0f378ad386
commit bafda61958

View File

@ -331,7 +331,8 @@ export default function CalendarPage() {
const filteredEvents = useMemo(() => {
if (calendars.length === 0) return events;
return events.filter((e) => visibleCalendarIds.has(e.calendar_id));
// Invited events bypass calendar visibility — they don't belong to the user's calendars
return events.filter((e) => e.is_invited || visibleCalendarIds.has(e.calendar_id));
}, [events, visibleCalendarIds, calendars.length]);
const searchResults = useMemo(() => {