-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(meetings): Add endpoint to get writable calendars and the defaul… #13964
base: main
Are you sure you want to change the base?
feat(meetings): Add endpoint to get writable calendars and the defaul… #13964
Conversation
…t calendar Signed-off-by: Joas Schilling <[email protected]>
… default calendar
Noticed that default calendar has a color 'null'. Is it also the case for you, and is it on our side? In calendar app i see it as purple, but maybe that's a fallback |
Color can be null, yes (as defined on the API). In that case you should use the primary color. |
protected function getSchedulingCalendarFromPropertiesTable(string $userId) { | ||
$propertyPath = 'principals/users/' . $userId; | ||
$propertyName = '{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL'; | ||
|
||
$query = $this->db->getQueryBuilder(); | ||
$query->select('propertyvalue') | ||
->from('properties') | ||
->where($query->expr()->eq('userid', $query->createNamedParameter($userId))) | ||
->andWhere($query->expr()->eq('propertypath', $query->createNamedParameter($propertyPath))) | ||
->andWhere($query->expr()->eq('propertyname', $query->createNamedParameter($propertyName))) | ||
->setMaxResults(1); | ||
|
||
$result = $query->executeQuery(); | ||
$property = $result->fetchOne(); | ||
$result->closeCursor(); | ||
|
||
return $property; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should go through the DAV app to get the default calendar URI, or you can use the user config:
$uri = $this->appConfig->getUserValue($userId, 'dav', 'defaultCalendar', CalDavBackend::PERSONAL_CALENDAR_URI);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, should use that preference,
but going through the dav app is to risky as it's all private api
…t calendar
☑️ Resolves
🛠️ API Checklist
🚧 Tasks
schedule-meeting
will be added once all APIs are implemented🏁 Checklist
docs/
has been updated or is not required