Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nickvergessen
Copy link
Member

…t calendar

☑️ Resolves

🛠️ API Checklist

🚧 Tasks

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

…t calendar

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen added 3. to review enhancement feature: api 🛠️ OCS API for conversations, chats and participants feature: meetings 📅 Covering the webinary usecase incl. Lobby labels Dec 9, 2024
@nickvergessen nickvergessen added this to the 🖤 Next Major (31) milestone Dec 9, 2024
@nickvergessen nickvergessen self-assigned this Dec 9, 2024
@Antreesy
Copy link
Contributor

Antreesy commented Dec 11, 2024

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

@nickvergessen
Copy link
Member Author

Noticed that default calendar has a color 'null'. Is it also the case for you, and is it on our side?

Color can be null, yes (as defined on the API). In that case you should use the primary color.

Comment on lines +157 to +173
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;
Copy link
Contributor

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);

Copy link
Member Author

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

Copy link
Member Author

@nickvergessen nickvergessen Dec 16, 2024

Choose a reason for hiding this comment

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

So I toggled this:
grafik

But there is no value in oc_preferences:
grafik

Copy link
Member Author

Choose a reason for hiding this comment

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

I also only find delete and get for that preference, no set anywhere:
grafik

Copy link
Contributor

Choose a reason for hiding this comment

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

@st3iny any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review enhancement feature: api 🛠️ OCS API for conversations, chats and participants feature: meetings 📅 Covering the webinary usecase incl. Lobby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants