Skip to content

Commit

Permalink
fixup! feat(caldav): linkify location in scheduling mails
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
ChristophWurst committed Aug 9, 2023
1 parent 5671393 commit d4ccf41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/dav/lib/CalDAV/Schedule/IMipService.php
Expand Up @@ -114,6 +114,7 @@ private function generateLinkifiedDiffString(VEvent $vevent, VEvent $oldVEvent,
if (!isset($vevent->$property)) {
return $default;
}
/** @var string|null $newstring */
$newstring = $vevent->$property->getValue();
if (isset($oldVEvent->$property) && $oldVEvent->$property->getValue() !== $newstring) {
$oldstring = $oldVEvent->$property->getValue();
Expand All @@ -125,7 +126,10 @@ private function generateLinkifiedDiffString(VEvent $vevent, VEvent $oldVEvent,
/**
* Convert a given url to a html link element or return null otherwise.
*/
private function linkify(string $url): ?string {
private function linkify(?string $url): ?string {
if ($url === null) {
return null;
}
if (!str_starts_with($url, 'http://') && !str_starts_with($url, 'https://')) {
return null;
}
Expand Down

0 comments on commit d4ccf41

Please sign in to comment.