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

The default reminder isn't added to the attendee #6315

Open
lufer22 opened this issue Sep 3, 2024 · 7 comments
Open

The default reminder isn't added to the attendee #6315

lufer22 opened this issue Sep 3, 2024 · 7 comments
Labels
1. to develop Accepted and waiting to be taken care of bug

Comments

@lufer22
Copy link

lufer22 commented Sep 3, 2024

Steps to reproduce

  1. Create an event
  2. Invite an attendee
  3. Open the event on the attendee's calendar
  4. Check the reminders section

Expected behavior

See the attendee default reminder set.

Actual behaviour

Attendee's Reminders section is empty.

Calendar app version

4.7.8

CalDAV-clients used

No response

Browser

chrome 122.0.6261.57

Client operating system

Mint linux

Server operating system

Debian linux

Web server

Apache

Database engine version

MariaDB

PHP engine version

Other

Nextcloud version

29.0.3

Updated from an older installed version or fresh install

Fresh install

List of activated apps

No response

Nextcloud configuration

No response

Web server error log

No response

Log file

No response

Browser log

No response

Additional info

PHP version: 8.3

@lufer22 lufer22 added 0. to triage Pending approval or rejection bug labels Sep 3, 2024
@miaulalala miaulalala added 1. to develop Accepted and waiting to be taken care of and removed 0. to triage Pending approval or rejection labels Sep 4, 2024
@miaulalala
Copy link
Contributor

miaulalala commented Sep 4, 2024

We do strip VALARMs from incoming scheduling messages, but that is simply good security - we don't want someone else be able to post alarms to your phone for example.

The default alarm isn't mentioned in the RFC, I guess it would make sense to add those.

@lufer22
Copy link
Author

lufer22 commented Sep 4, 2024

Hello! I'm searching for a solution to this. Can you help me with some ideas to solve it?
I was thinking of doing it in the frontend, maybe using the isViewedByAttendee flag along with something else.

Or set the default when the calendar events are fetched.

I'll make a PR if I succeed. :D

@miaulalala
Copy link
Contributor

Hello! I'm searching for a solution to this. Can you help me with some ideas to solve it? I was thinking of doing it in the frontend, maybe using the isViewedByAttendee flag along with something else.

Or set the default when the calendar events are fetched.

I'll make a PR if I succeed. :D

Since there's quite a few ways to accept an invitation - via button in an email, from different clients on all sorts of platforms, etc, the VALARM default would ideally be added during the scheduling processing in the backend code in the DAV app. So any client you accept an invitation from writes the default reminder.

If you're familiar with PHP you could try a change in the DAV app, although it will mean overwriting a lot of library code. If you'd like some guidance on this, ping me with a WIP and we can look through it - or you can join the DEV chat for Groupware here if you'd like: https://cloud.nextcloud.com/call/5qb8fujz

@lufer22
Copy link
Author

lufer22 commented Sep 5, 2024

Since there's quite a few ways to accept an invitation - via button in an email, from different clients on all sorts of platforms, etc, the VALARM default would ideally be added during the scheduling processing in the backend code in the DAV app. So any client you accept an invitation from writes the default reminder.

If you're familiar with PHP you could try a change in the DAV app, although it will mean overwriting a lot of library code. If you'd like some guidance on this, ping me with a WIP and we can look through it - or you can join the DEV chat for Groupware here if you'd like: https://cloud.nextcloud.com/call/5qb8fujz

Oh, very nice!
Regarding the DAV app, do you mean the dav folder inside the server apps folder?

@miaulalala
Copy link
Contributor

Since there's quite a few ways to accept an invitation - via button in an email, from different clients on all sorts of platforms, etc, the VALARM default would ideally be added during the scheduling processing in the backend code in the DAV app. So any client you accept an invitation from writes the default reminder.
If you're familiar with PHP you could try a change in the DAV app, although it will mean overwriting a lot of library code. If you'd like some guidance on this, ping me with a WIP and we can look through it - or you can join the DEV chat for Groupware here if you'd like: cloud.nextcloud.com/call/5qb8fujz

Oh, very nice! Regarding the DAV app, do you mean the dav folder inside the server apps folder?

Exactly. It's shipped with server so you'd open a PR in the server repo.

@lufer22
Copy link
Author

lufer22 commented Sep 5, 2024

Since there's quite a few ways to accept an invitation - via button in an email, from different clients on all sorts of platforms, etc, the VALARM default would ideally be added during the scheduling processing in the backend code in the DAV app. So any client you accept an invitation from writes the default reminder.
If you're familiar with PHP you could try a change in the DAV app, although it will mean overwriting a lot of library code. If you'd like some guidance on this, ping me with a WIP and we can look through it - or you can join the DEV chat for Groupware here if you'd like: cloud.nextcloud.com/call/5qb8fujz

Oh, very nice! Regarding the DAV app, do you mean the dav folder inside the server apps folder?

Exactly. It's shipped with server so you'd open a PR in the server repo.

Understood!
Do you know of a file I can start with?
I'm a little bit lost in it, haha.

@miaulalala
Copy link
Contributor

Since there's quite a few ways to accept an invitation - via button in an email, from different clients on all sorts of platforms, etc, the VALARM default would ideally be added during the scheduling processing in the backend code in the DAV app. So any client you accept an invitation from writes the default reminder.
If you're familiar with PHP you could try a change in the DAV app, although it will mean overwriting a lot of library code. If you'd like some guidance on this, ping me with a WIP and we can look through it - or you can join the DEV chat for Groupware here if you'd like: cloud.nextcloud.com/call/5qb8fujz

Oh, very nice! Regarding the DAV app, do you mean the dav folder inside the server apps folder?

Exactly. It's shipped with server so you'd open a PR in the server repo.

Understood! Do you know of a file I can start with? I'm a little bit lost in it, haha.

https://github.com/nextcloud/server/blob/0df30363a4948384f8da43b963254ce69961f320/apps/dav/lib/CalDAV/Schedule/Plugin.php#L223

is where you want the changes to go to. It means overwriting \Sabre\CalDAV\Schedule\Plugin::scheduleLocalDelivery (the parent call you can see in the method) more thoroughly than we're doing at the moment. This is a change I wouldn't be opposed to as it would open the door to more changes in the future.

I'd suggest starting with moving the contents of the parent method into the overwriting method (so, replacing the call to parent::scheduleLocalDelivery) and then looking through it to determine how to find the default reminder length for the correct calendar.

If you then want to include this value in the generated VEVENT, it most likely also means extending the \Sabre\VObject\ITip\Broker class with your own implementation and overwriting processMessageReply to include this value as a VALARM in the generated iTIP message.

It helps if you have a debugger where you can step through the whole thing and learn about which object holds which value.

Give it a shot and we can talk about how to best implement that in the chat on Monday if you like. Even if you don't get very far, feel free to push your changes in a PR.

If you have any question regarding the technical details of this whole process (calendar scheduling), the RFC is long but worth reading. Sometimes, just searching for keywords in the document also helps a lot. Otherwise, feel free to ping the chat as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug
Projects
None yet
Development

No branches or pull requests

2 participants