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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: filter declined and cancelled events from Outlook calendar sync and all views
Adam Eivy35905848b940
diff --git a/server/services/calendarApiSync.js b/server/services/calendarApiSync.jsindex 219c5feffd..a9dbc76aaf 100644--- a/server/services/calendarApiSync.js+++ b/server/services/calendarApiSync.js@@ -140,6 +140,11 @@ export async function syncOutlookCalendarApi(account, _cache, io, options = {})io.emit('calendar:sync:event', { accountId: account.id, events });}- console.log(`📅 Calendar API sync complete: ${events.length} events fetched in ${page} page(s)`);- return { events, status: 'success', syncMethod: 'api' };+ // Filter out declined events (user configured Outlook to retain declined invites)+ const filtered = events.filter(e => e.myStatus !== 'declined');+ const declined = events.length - filtered.length;+ if (declined > 0) console.log(`📅 Filtered ${declined} declined events`);++ console.log(`📅 Calendar API sync complete: ${filtered.length} events (${declined} declined skipped) in ${page} page(s)`);+ return { events: filtered, status: 'success', syncMethod: 'api' };}diff --git a/server/services/calendarSync.js b/server/services/calendarSync.jsindex 0975635bc6..1a239ba176 100644--- a/server/services/calendarSync.js+++ b/server/services/calendarSync.js@@ -52,6 +52,10 @@ export async function saveCache(accountId, cache) {await writeFile(filePath, JSON.stringify(cache, null, 2));}+function filterDeclinedAndCancelled(events) {+ return events.filter(e => e.myStatus !== 'declined' && !e.isCancelled);+}+function filterByEnabledSubcalendars(events, account) {if (!account?.subcalendars?.length) return events;const enabledIds = new Set(@@ -68,6 +72,7 @@ export async function getEvents(options = {}) {const cache = await loadCache(accountId);const account = await getAccount(accountId);let events = cache.events.map(e => ({ ...e, accountId: e.accountId || accountId }));+ events = filterDeclinedAndCancelled(events);events = filterByEnabledSubcalendars(events, account);events = filterBySearch(events, search);events = filterByDateRange(events, startDate, endDate);@@ -91,6 +96,7 @@ export async function getEvents(options = {}) {if (!UUID_RE.test(fileAccountId)) continue;const cache = await loadCache(fileAccountId);let events = cache.events.map(e => ({ ...e, accountId: e.accountId || fileAccountId }));+ events = filterDeclinedAndCancelled(events);events = filterByEnabledSubcalendars(events, accountMap.get(fileAccountId));allEvents.push(...events);}