Account for false return value of Repository\Notify->insert in notification()

- Address https://github.com/friendica/friendica/issues/8473#issuecomment-651393541
This commit is contained in:
Hypolite Petovan 2020-06-29 18:58:17 -04:00
parent 91c843608b
commit a3e775f28c
1 changed files with 5 additions and 0 deletions

View File

@ -479,6 +479,11 @@ function notification($params)
'otype' => $params['otype'] ?? '',
]);
// Notification insertion can be intercepted by an addon registering the 'enotify_store' hook
if (!$notification) {
return false;
}
$notification->msg = Renderer::replaceMacros($epreamble, ['$itemlink' => $notification->link]);
DI::notify()->update($notification);