Merge pull request #21247 from nextcloud/backport/21229/stable19

[stable19] Fix empty event UUID reminder notifications
This commit is contained in:
Roeland Jago Douma 2020-06-05 13:38:47 +02:00 committed by GitHub
commit bbd97db4f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -95,8 +95,10 @@ class PushProvider extends AbstractProvider {
$eventDetails = $this->extractEventDetails($vevent); $eventDetails = $this->extractEventDetails($vevent);
$eventDetails['calendar_displayname'] = $calendarDisplayName; $eventDetails['calendar_displayname'] = $calendarDisplayName;
$eventUUID = (string) $vevent->UID; $eventUUID = (string) $vevent->UID;
// Empty Notification ObjectId will be catched by OC\Notification\Notification if (!$eventUUID) {
$eventUUIDHash = $eventUUID ? hash('sha256', $eventUUID, false) : ''; return;
};
$eventUUIDHash = hash('sha256', $eventUUID, false);
foreach ($users as $user) { foreach ($users as $user) {
/** @var INotification $notification */ /** @var INotification $notification */