diff options
author | Georg Ehrke <developer@georgehrke.com> | 2019-09-02 15:18:43 +0200 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2019-09-02 15:18:43 +0200 |
commit | 88f6d1c20edf41bf581d973263a3749948ef4f4c (patch) | |
tree | bd554008994fba80047be2486ff377e1ada29240 /apps/dav/lib | |
parent | daf89e6b34515222b55bdd6bc32c9001664ac548 (diff) | |
download | nextcloud-server-88f6d1c20edf41bf581d973263a3749948ef4f4c.tar.gz nextcloud-server-88f6d1c20edf41bf581d973263a3749948ef4f4c.zip |
Make push notifications for calendar reminders opt-in
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/Settings/CalDAVSettings.php | 1 |
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); |