fixes from code-review
This commit is contained in:
parent
010114b887
commit
70c7173020
|
@ -44,11 +44,11 @@ interface INotificationProvider {
|
||||||
* @param VEvent $vevent
|
* @param VEvent $vevent
|
||||||
* @param string $calendarDisplayName
|
* @param string $calendarDisplayName
|
||||||
* @param IUser[] $users
|
* @param IUser[] $users
|
||||||
* @param IUser $userOfReminder
|
* @param IUser $reminderOwner
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function send(VEvent $vevent,
|
public function send(VEvent $vevent,
|
||||||
string $calendarDisplayName,
|
string $calendarDisplayName,
|
||||||
array $users = [],
|
array $users = [],
|
||||||
IUser $userOfReminder = null): void;
|
IUser $reminderOwner = null): void;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,13 +91,13 @@ abstract class AbstractProvider implements INotificationProvider {
|
||||||
* @param VEvent $vevent
|
* @param VEvent $vevent
|
||||||
* @param string $calendarDisplayName
|
* @param string $calendarDisplayName
|
||||||
* @param IUser[] $users
|
* @param IUser[] $users
|
||||||
* @param IUser $userOfReminder
|
* @param IUser $reminderOwner
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
abstract public function send(VEvent $vevent,
|
abstract public function send(VEvent $vevent,
|
||||||
string $calendarDisplayName,
|
string $calendarDisplayName,
|
||||||
array $users = [],
|
array $users = [],
|
||||||
IUser $userOfReminder = null): void;
|
IUser $reminderOwner = null): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
|
|
|
@ -81,13 +81,13 @@ class EmailProvider extends AbstractProvider {
|
||||||
* @param VEvent $vevent
|
* @param VEvent $vevent
|
||||||
* @param string $calendarDisplayName
|
* @param string $calendarDisplayName
|
||||||
* @param array $users
|
* @param array $users
|
||||||
* @param IUser $userOfReminder
|
* @param IUser $reminderOwner
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function send(VEvent $vevent,
|
public function send(VEvent $vevent,
|
||||||
string $calendarDisplayName,
|
string $calendarDisplayName,
|
||||||
array $users = [],
|
array $users = [],
|
||||||
IUser $userOfReminder = null):void {
|
IUser $reminderOwner = null):void {
|
||||||
$fallbackLanguage = $this->getFallbackLanguage();
|
$fallbackLanguage = $this->getFallbackLanguage();
|
||||||
|
|
||||||
$emailAddressesOfSharees = $this->getEMailAddressesOfAllUsersWithWriteAccessToCalendar($users);
|
$emailAddressesOfSharees = $this->getEMailAddressesOfAllUsersWithWriteAccessToCalendar($users);
|
||||||
|
@ -96,7 +96,7 @@ class EmailProvider extends AbstractProvider {
|
||||||
|
|
||||||
$emailAddressesOfAttendees = [];
|
$emailAddressesOfAttendees = [];
|
||||||
|
|
||||||
if ($userOfReminder && strcasecmp($userOfReminder->getEMailAddress(), key($organizer)) == 0) {
|
if ($organizer !== null && $reminderOwner instanceof IUser && strcasecmp($reminderOwner->getEMailAddress(), key($organizer)) === 0) {
|
||||||
$emailAddressesOfAttendees = $this->getAllEMailAddressesFromEvent($vevent);
|
$emailAddressesOfAttendees = $this->getAllEMailAddressesFromEvent($vevent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ class EmailProvider extends AbstractProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
$organizer = $vevent->ORGANIZER;
|
$organizer = $vevent->ORGANIZER;
|
||||||
if (!str_starts_with($organizer->getValue(), 'mailto:')) {
|
if (strcasecmp($organizer->getValue(), 'mailto:') !== 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,13 +83,13 @@ class PushProvider extends AbstractProvider {
|
||||||
* @param VEvent $vevent
|
* @param VEvent $vevent
|
||||||
* @param string $calendarDisplayName
|
* @param string $calendarDisplayName
|
||||||
* @param IUser[] $users
|
* @param IUser[] $users
|
||||||
* @param IUser $userOfReminder
|
* @param IUser $reminderOwner
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function send(VEvent $vevent,
|
public function send(VEvent $vevent,
|
||||||
string $calendarDisplayName = null,
|
string $calendarDisplayName = null,
|
||||||
array $users = [],
|
array $users = [],
|
||||||
IUser $userOfReminder = null):void {
|
IUser $reminderOwner = null):void {
|
||||||
if ($this->config->getAppValue('dav', 'sendEventRemindersPush', 'no') !== 'yes') {
|
if ($this->config->getAppValue('dav', 'sendEventRemindersPush', 'no') !== 'yes') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue