From 823908b0172b8fbe34761ceba6bc9ca16d9c600e Mon Sep 17 00:00:00 2001 From: hamza221 Date: Tue, 29 Aug 2023 16:16:57 +0200 Subject: [PATCH] Enable caldav push notifications by default Signed-off-by: hamza221 --- .../lib/CalDAV/Reminder/NotificationProvider/PushProvider.php | 2 +- apps/dav/lib/Settings/CalDAVSettings.php | 2 +- .../CalDAV/Reminder/NotificationProvider/PushProviderTest.php | 4 ++-- apps/dav/tests/unit/Settings/CalDAVSettingsTest.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php index be8bafd2f35..ab7f12c570a 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php @@ -82,7 +82,7 @@ class PushProvider extends AbstractProvider { ?string $calendarDisplayName, array $principalEmailAddresses, array $users = []):void { - if ($this->config->getAppValue('dav', 'sendEventRemindersPush', 'no') !== 'yes') { + if ($this->config->getAppValue('dav', 'sendEventRemindersPush', 'yes') !== 'yes') { return; } diff --git a/apps/dav/lib/Settings/CalDAVSettings.php b/apps/dav/lib/Settings/CalDAVSettings.php index b3825a6a37c..1938d20c9f5 100644 --- a/apps/dav/lib/Settings/CalDAVSettings.php +++ b/apps/dav/lib/Settings/CalDAVSettings.php @@ -47,7 +47,7 @@ class CalDAVSettings implements IDelegatedSettings { 'generateBirthdayCalendar' => 'yes', 'sendEventReminders' => 'yes', 'sendEventRemindersToSharedUsers' => 'yes', - 'sendEventRemindersPush' => 'no', + 'sendEventRemindersPush' => 'yes', ]; /** diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php index a0d5ebb3489..4b29622ee29 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php @@ -66,7 +66,7 @@ class PushProviderTest extends AbstractNotificationProviderTest { public function testNotSend(): void { $this->config->expects($this->once()) ->method('getAppValue') - ->with('dav', 'sendEventRemindersPush', 'no') + ->with('dav', 'sendEventRemindersPush', 'yes') ->willReturn('no'); $this->manager->expects($this->never()) @@ -92,7 +92,7 @@ class PushProviderTest extends AbstractNotificationProviderTest { public function testSend(): void { $this->config->expects($this->once()) ->method('getAppValue') - ->with('dav', 'sendEventRemindersPush', 'no') + ->with('dav', 'sendEventRemindersPush', 'yes') ->willReturn('yes'); $user1 = $this->createMock(IUser::class); diff --git a/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php b/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php index 7d285a830d9..296f6f9ef8c 100644 --- a/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php +++ b/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php @@ -62,7 +62,7 @@ class CalDAVSettingsTest extends TestCase { ['dav', 'generateBirthdayCalendar', 'yes'], ['dav', 'sendEventReminders', 'yes'], ['dav', 'sendEventRemindersToSharedUsers', 'yes'], - ['dav', 'sendEventRemindersPush', 'no'], + ['dav', 'sendEventRemindersPush', 'yes'], ) ->will($this->onConsecutiveCalls('yes', 'no', 'yes', 'yes', 'yes')); $this->urlGenerator