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

E-Mail-Reminder to all attendees is sent only by organizer #26496

Conversation

christlang
Copy link

@christlang christlang commented Apr 10, 2021

When the organizer adds the reminder the nextcloud attendees only get 2 mails now.

  • one from the organizer
  • one for their own reminder

outside-users get only the mail from the organizer, because they have no own reminders

Fixes #21370

@christlang christlang changed the title E-Mail-Reminder to all attendees is sent only by organizer #2896 E-Mail-Reminder to all attendees is sent only by organizer Apr 10, 2021
@christlang christlang changed the title #2896 E-Mail-Reminder to all attendees is sent only by organizer resolves #2896 E-Mail-Reminder to all attendees is sent only by organizer Apr 10, 2021
@christlang christlang changed the title resolves #2896 E-Mail-Reminder to all attendees is sent only by organizer E-Mail-Reminder to all attendees is sent only by organizer Apr 10, 2021
@christlang christlang changed the title E-Mail-Reminder to all attendees is sent only by organizer resolves #21370 E-Mail-Reminder to all attendees is sent only by organizer Apr 10, 2021
@solracsf solracsf added the 3. to review Waiting for reviews label Apr 10, 2021
@tcitworld
Copy link
Member

Seems you need to update a test as well:

There was 1 failure:

1) OCA\DAV\Tests\unit\CalDAV\Reminder\NotificationProvider\EmailProviderTest::testSendWithAttendees
Expectation failed for method name is "validateMailAddress" when invoked at sequence index 1
Parameter 0 for invocation OCP\Mail\IMailer::validateMailAddress('[email protected]'): bool does not match expected value.
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'[email protected]'
+'[email protected]'

/drone/src/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php:127
/drone/src/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php:340

@ChristophWurst ChristophWurst changed the title resolves #21370 E-Mail-Reminder to all attendees is sent only by organizer E-Mail-Reminder to all attendees is sent only by organizer Apr 12, 2021
@EhiOnime
Copy link

EhiOnime commented May 6, 2021

OK I think I found the solution to the problem in 21370 by changing the SQL query in Reminder/Backend.php and adding a GroupBy clause to ensure that even if there are multiple entries in the database, only a single one is returned:

Diff Patch is attached it should be applied in your nextcloud/apps/dav directory

single-notifications.txt

@christlang
Copy link
Author

@EhiOnime I like your solution ;)

Have you tested it? Because you get only one reminder back from the sql-query only one will be performed. And in the next run the next run the next will be performed, isn't it?

@christlang christlang force-pushed the 2896_multiple_notifications_on_one_reminder branch from 6fa8f8b to 70c7173 Compare May 8, 2021 12:23
@christlang
Copy link
Author

ah for the tests I have to install phpunit ...
https://docs.nextcloud.com/server/latest/developer_manual/core/unit-testing.html

@EhiOnime
Copy link

EhiOnime commented May 8, 2021 via email

@EhiOnime
Copy link

EhiOnime commented May 9, 2021 via email

@szaimen szaimen added this to the Nextcloud 23 milestone Jul 6, 2021
@skjnldsv skjnldsv mentioned this pull request Oct 13, 2021
@skjnldsv skjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Oct 22, 2021
@skjnldsv skjnldsv modified the milestones: Nextcloud 23, Nextcloud 24 Oct 22, 2021
@miaulalala
Copy link
Contributor

Hi @christlang , are you planning on updating this PR? If not, would you mind if I took over? What you have done so far looks good, would be a shame to have wasted your time!

@christlang
Copy link
Author

your are welcome to finish this work, sorry for late response. You see I have not really the time to bring this to an end ;) thanks for taking over

@miaulalala miaulalala self-assigned this Feb 3, 2022
@skjnldsv skjnldsv mentioned this pull request Mar 24, 2022
@blizzz blizzz mentioned this pull request Mar 31, 2022
This was referenced Apr 7, 2022
@blizzz blizzz modified the milestones: Nextcloud 24, Nextcloud 25 Apr 21, 2022
This was referenced Aug 12, 2022
This was referenced Aug 24, 2022
This was referenced Sep 6, 2022
@skjnldsv skjnldsv mentioned this pull request Sep 15, 2022
This was referenced Sep 20, 2022
@tcitworld tcitworld added the feature: caldav Related to CalDAV internals label Sep 22, 2022
@blizzz blizzz modified the milestones: Nextcloud 25, Nextcloud 26 Sep 22, 2022
@miaulalala
Copy link
Contributor

Closing in favour of #34417

@miaulalala miaulalala closed this Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress feature: caldav Related to CalDAV internals
Projects
Development

Successfully merging this pull request may close these issues.

Calendar sends duplicate notifications if there is an additional attendee [$250]
9 participants