Skip to content

feat: add calendar delegation#1040

Open
GVodyanov wants to merge 2 commits into
mainfrom
feat/calendar-delegation
Open

feat: add calendar delegation#1040
GVodyanov wants to merge 2 commits into
mainfrom
feat/calendar-delegation

Conversation

@GVodyanov
Copy link
Copy Markdown
Contributor

Required for nextcloud/calendar#8085

@SebastianKrupinski @tcitworld As per your requests, here is the service from the calendar PR

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 0% with 52 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/index.js 0.00% 52 Missing ⚠️

📢 Thoughts on this report? Let us know!

GVodyanov added 2 commits May 20, 2026 18:10
Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
Comment thread src/index.js
Comment on lines +569 to +578
async getCalendarHomeUrlForPrincipal(principalUrl) {
const { body } = await this._request.propFind(principalUrl, [
[NS.IETF_CALDAV, 'calendar-home-set'],
])
const homes = body[`{${NS.IETF_CALDAV}}calendar-home-set`]
if (!homes || !homes.length) {
return null
}
return this._request.absoluteUrl(homes[0])
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already do this in _extractCalendarHomes (at the bottom) all the homes are map to this.calendarHomes

Comment thread src/index.js
Comment on lines +498 to +501
getCalendarHomeForUrl(calendarHomeUrl) {
const url = this._request.pathname(calendarHomeUrl)
return new CalendarHome(this, this._request, url, {})
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the calendar homes are mapped to this.calendarHomes already, there should be no need to do this again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants