From 36b9b51297165afcb9071d72f83cf431b01b4edd Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Fri, 2 Aug 2019 16:26:51 +0200 Subject: [PATCH] run send reminders background-job only when mode is not set to occ Signed-off-by: Georg Ehrke --- apps/dav/lib/BackgroundJob/EventReminderJob.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/dav/lib/BackgroundJob/EventReminderJob.php b/apps/dav/lib/BackgroundJob/EventReminderJob.php index e0a147e420..dfa76ffe16 100644 --- a/apps/dav/lib/BackgroundJob/EventReminderJob.php +++ b/apps/dav/lib/BackgroundJob/EventReminderJob.php @@ -50,10 +50,15 @@ class EventReminderJob extends TimedJob { * @throws \OCA\DAV\CalDAV\Reminder\NotificationTypeDoesNotExistException * @throws \OC\User\NoUserException */ - public function run($arg): void - { - if ($this->config->getAppValue('dav', 'sendEventReminders', 'yes') === 'yes') { - $this->reminderService->processReminders(); + public function run($arg):void { + if ($this->config->getAppValue('dav', 'sendEventReminders', 'yes') !== 'yes') { + return; } + + if ($this->config->getAppValue('dav', 'sendEventRemindersMode', 'backgroundjob') !== 'backgroundjob') { + return; + } + + $this->reminderService->processReminders(); } }