Skip to content

Commit bbd97db

Browse files
authored
Merge pull request #21247 from nextcloud/backport/21229/stable19
[stable19] Fix empty event UUID reminder notifications
2 parents 70c1745 + 8cef51b commit bbd97db

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ public function send(VEvent $vevent,
9595
$eventDetails = $this->extractEventDetails($vevent);
9696
$eventDetails['calendar_displayname'] = $calendarDisplayName;
9797
$eventUUID = (string) $vevent->UID;
98-
// Empty Notification ObjectId will be catched by OC\Notification\Notification
99-
$eventUUIDHash = $eventUUID ? hash('sha256', $eventUUID, false) : '';
98+
if (!$eventUUID) {
99+
return;
100+
};
101+
$eventUUIDHash = hash('sha256', $eventUUID, false);
100102

101103
foreach ($users as $user) {
102104
/** @var INotification $notification */

0 commit comments

Comments
 (0)