mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-25 18:55:19 +02:00
dont sync working location
This commit is contained in:
parent
83389e93fc
commit
a4697fc281
1 changed files with 7 additions and 0 deletions
|
|
@ -30,6 +30,10 @@ function formatEventTime(event: AnyEvent): string {
|
|||
return `${startStr} → ${endStr}`;
|
||||
}
|
||||
|
||||
function shouldSyncCalendarEvent(event: cal.Schema$Event): boolean {
|
||||
return event.eventType !== 'workingLocation';
|
||||
}
|
||||
|
||||
function formatEventBlock(event: AnyEvent, label: 'NEW' | 'UPDATED'): string {
|
||||
const id = getStr(event, 'id') ?? '(unknown id)';
|
||||
const title = getStr(event, 'summary') ?? '(no title)';
|
||||
|
|
@ -347,6 +351,9 @@ async function syncCalendarWindow(auth: OAuth2Client, syncDir: string, lookbackD
|
|||
console.log(`Found ${events.length} events.`);
|
||||
for (const event of events) {
|
||||
if (event.id) {
|
||||
if (!shouldSyncCalendarEvent(event)) {
|
||||
continue;
|
||||
}
|
||||
const result = await saveEvent(event, syncDir);
|
||||
const attachmentsSaved = await processAttachments(drive, event, syncDir);
|
||||
currentEventIds.add(event.id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue