-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
don't send invitation emails for past events #5304
don't send invitation emails for past events #5304
Conversation
6d74321
to
677267b
Compare
Codecov Report
@@ Coverage Diff @@
## master #5304 +/- ##
============================================
- Coverage 54.49% 53.86% -0.63%
- Complexity 21220 22777 +1557
============================================
Files 1313 1405 +92
Lines 82440 86748 +4308
Branches 1329 1328 -1
============================================
+ Hits 44922 46727 +1805
- Misses 37518 40021 +2503
|
apps/dav/appinfo/v1/caldav.php
Outdated
@@ -52,6 +52,7 @@ | |||
$calDavBackend = new CalDavBackend($db, $principalBackend, $userManager, $random, $dispatcher, true); | |||
|
|||
$debugging = \OC::$server->getConfig()->getSystemValue('debug', false); | |||
$sendInvitations = \OC::$server->getConfig()->getSystemValue('caldav_send_invitations', true); |
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.
I'm usually not really a fan of configuration values. Is there a reason we do really need to have that one? 🙈
Also stuff in the app config is usually easier to deploy on clusters :)
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.
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.
also #2345
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.
Not sure we will ever change that value on clusters.
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.
Besides this configuration value, it would be more intuitive to have a checkbox when importing a calendar. The user itself, who has no access to the config.php should be able to decide whether to send invitaions for future events or not while importing a calendar.
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.
it would be more intuitive to have a checkbox when importing a calendar
Or maybe never send invitations on import?
Anyway, that's out of scope for this pr.
Let's continue the discussion here: nextcloud/calendar#576
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.
I would also not make it a server wide setting. Just remove the added stuff (compared to the backport) and then we can get this in.
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.
Ok, I will remove that commit for now.
I would anyway still like to add this feature in the future.
Should I just implement it via the appconfig table?
any update on merging this pull request? |
@kosli There is still something missing, see the first post. Won't have time to look into this before the weekend. |
@georgehrke ups, I didn't see the ToDo on top. Thanks! |
677267b
to
7e24c8c
Compare
rebased |
One thing I wasn't sure about: Should it not send out invitations for any events in the past or only for events that are older than 2 weeks / month ? |
I wouldn't sent out any invitations for past events, after all those either have been sent already or the user decided not to sent them... Or are you afraid some events would end up being missed? |
Backport to review once this is merged: #5841 |
Import of a calendar in a fresh nextcloud 12.0.1 with these changes applied is working. The option to turn off resending invitation mails via the config setting is also working. |
@LukasReschke happy with the changes/feedback from Georg? It'd be nice to get this in so 12.0.3 will not resent all these invitations 😢 |
apps/dav/appinfo/v1/caldav.php
Outdated
@@ -52,6 +52,7 @@ | |||
$calDavBackend = new CalDavBackend($db, $principalBackend, $userManager, $random, $dispatcher, true); | |||
|
|||
$debugging = \OC::$server->getConfig()->getSystemValue('debug', false); | |||
$sendInvitations = \OC::$server->getConfig()->getSystemValue('caldav_send_invitations', true); |
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.
I would also not make it a server wide setting. Just remove the added stuff (compared to the backport) and then we can get this in.
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
7e24c8c
to
a1df91d
Compare
AWESOME! |
fixes #2855