summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-09-04 20:08:21 +0200
committerGitHub <noreply@github.com>2019-09-04 20:08:21 +0200
commit4456d01c6ed6bb6021d98dc527529f0de227d874 (patch)
tree733fd97ceb6dff0bbe6d094e9d384b56c0871f69 /apps/dav/lib
parentd744c04a865766cf2e5c11e8c43183fd4bf9669e (diff)
parent88f6d1c20edf41bf581d973263a3749948ef4f4c (diff)
downloadnextcloud-server-4456d01c6ed6bb6021d98dc527529f0de227d874.tar.gz
nextcloud-server-4456d01c6ed6bb6021d98dc527529f0de227d874.zip
Merge pull request #16970 from nextcloud/bugfix/noid/opt_in_for_push_notifications_calendar_reminders
Make push notifications for calendar reminders opt-in
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php4
-rw-r--r--apps/dav/lib/Settings/CalDAVSettings.php1
2 files changed, 5 insertions, 0 deletions
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
index 3872b67e596..6e9e7831865 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
@@ -83,6 +83,10 @@ class PushProvider extends AbstractProvider {
public function send(VEvent $vevent,
string $calendarDisplayName=null,
array $users=[]):void {
+ if ($this->config->getAppValue('dav', 'sendEventRemindersPush', 'no') !== 'yes') {
+ return;
+ }
+
$eventDetails = $this->extractEventDetails($vevent);
$eventDetails['calendar_displayname'] = $calendarDisplayName;
diff --git a/apps/dav/lib/Settings/CalDAVSettings.php b/apps/dav/lib/Settings/CalDAVSettings.php
index 958c463b1d3..8e9b2aae926 100644
--- a/apps/dav/lib/Settings/CalDAVSettings.php
+++ b/apps/dav/lib/Settings/CalDAVSettings.php
@@ -49,6 +49,7 @@ class CalDAVSettings implements ISettings {
'send_invitations' => $this->config->getAppValue('dav', 'sendInvitations', 'yes'),
'generate_birthday_calendar' => $this->config->getAppValue('dav', 'generateBirthdayCalendar', 'yes'),
'send_reminders_notifications' => $this->config->getAppValue('dav', 'sendEventReminders', 'yes'),
+ 'send_reminders_notifications_push' => $this->config->getAppValue('dav', 'sendEventRemindersPush', 'no'),
];
return new TemplateResponse('dav', 'settings-admin-caldav', $parameters);