Browse Source

Enable caldav push notifications by default

Signed-off-by: hamza221 <hamzamahjoubi221@gmail.com>
pull/40103/head
hamza221 2 years ago
parent
commit
823908b017
  1. 2
      apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
  2. 2
      apps/dav/lib/Settings/CalDAVSettings.php
  3. 4
      apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php
  4. 2
      apps/dav/tests/unit/Settings/CalDAVSettingsTest.php

2
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;
}

2
apps/dav/lib/Settings/CalDAVSettings.php

@ -47,7 +47,7 @@ class CalDAVSettings implements IDelegatedSettings {
'generateBirthdayCalendar' => 'yes',
'sendEventReminders' => 'yes',
'sendEventRemindersToSharedUsers' => 'yes',
'sendEventRemindersPush' => 'no',
'sendEventRemindersPush' => 'yes',
];
/**

4
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);

2
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

Loading…
Cancel
Save