Skip to content

Conversation

@st3iny
Copy link
Member

@st3iny st3iny commented Jan 8, 2025

Summary

Add a public API to check if a list of attendees are available in a given time slot. Note that for now, the email addresses of the given attendees have to belong to users on the same instance.

Usage example

$start = new DateTimeImmutable('now');
$result = $this->calendarManager->checkAvailability(
	$start,
	$start->add(new \DateInterval('PT2H')),
	$organizer, // IUser(uid=admin, [email protected])
	['[email protected]', '[email protected]']
)

// Result (see \OCP\Calendar\IAvailabilityResult):
// $result[0]->getAttendeeEmail() === '[email protected]'
// $result[0]->isAvailable() === false
// $result[1]->getAttendeeEmail() === '[email protected]'
// $result[1]->isAvailable() === true
// $result[2]->getAttendeeEmail() === '[email protected]'
// $result[2]->isAvailable() === false

Checklist

@st3iny st3iny added enhancement 2. developing Work in progress integration feature: caldav Related to CalDAV internals labels Jan 8, 2025
@st3iny st3iny self-assigned this Jan 8, 2025
@st3iny st3iny marked this pull request as ready for review January 9, 2025 09:42
@st3iny st3iny added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 9, 2025
@st3iny st3iny added this to the Nextcloud 31 milestone Jan 9, 2025
@blizzz blizzz mentioned this pull request Jan 9, 2025
Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

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

Looks like it can do the job, but didn't test

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

Looks good otherwise :)

@st3iny st3iny requested a review from ChristophWurst January 11, 2025 13:34
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

Looks good!

@st3iny st3iny force-pushed the feat/ocp/attendee-availability-api branch from 946b279 to 3dbdf32 Compare January 13, 2025 09:12
@st3iny st3iny added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jan 13, 2025
@st3iny st3iny enabled auto-merge January 13, 2025 09:12
@st3iny st3iny merged commit a6bcaf7 into master Jan 13, 2025
188 checks passed
@st3iny st3iny deleted the feat/ocp/attendee-availability-api branch January 13, 2025 15:16
@skjnldsv skjnldsv mentioned this pull request Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish enhancement feature: caldav Related to CalDAV internals integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants