Skip to content

Commit

Permalink
fixup! Use recurrence instance to build iMip email
Browse files Browse the repository at this point in the history
  • Loading branch information
miaulalala committed Jul 11, 2023
1 parent 6e17dbb commit c5c4a69
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,11 @@ public function schedule(Message $iTipMessage) {
}

$mailto = $iTipMessage->recipient;
if($mailto === null) {
return;
}

// Strip off mailto:
$recipient = substr($mailto, 7);
if($recipient === false) {
return;
}
if (!$this->mailer->validateMailAddress($recipient)) {
// Nothing to send if the recipient doesn't have a valid email address
$iTipMessage->scheduleStatus = '5.0; EMail delivery failed';
Expand Down Expand Up @@ -218,6 +217,9 @@ public function schedule(Message $iTipMessage) {
$senderName = $this->userManager->getDisplayName($this->userId);

Check notice

Code scanning / Psalm

PossiblyNullArgument Note

Argument 1 of OCP\IUserManager::getDisplayName cannot be null, possibly null value provided
}
$sender = substr($iTipMessage->sender, 7);
if($sender === false) {
$sender = Util::getDefaultEmailAddress('invitations-noreply');
}

switch (strtolower($iTipMessage->method)) {
case self::METHOD_REPLY:
Expand Down

0 comments on commit c5c4a69

Please sign in to comment.