mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-05 08:19:48 +08:00
fix(server): caldav compatibility (#14930)
fix #14411 fix #14909 Some CalDAV servers do not implement standard responses; add compatibility for these servers. #### PR Dependency Tree * **PR #14930** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved CalDAV discovery error handling to gracefully fall back when the server returns certain error statuses. * **New Features** * CalDAV account linking now returns the number of discovered calendars associated with the account. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -272,7 +272,10 @@ export class CalendarService {
|
||||
throw error;
|
||||
}
|
||||
|
||||
return account;
|
||||
const calendars = await this.models.calendarSubscription.listByAccount(
|
||||
account.id
|
||||
);
|
||||
return { ...account, calendarsCount: calendars.length };
|
||||
}
|
||||
|
||||
async syncAccountCalendars(accountId: string) {
|
||||
|
||||
Reference in New Issue
Block a user