X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fenotify.php;h=732c1d7b43c18e401f5cb31c494b3689780ec2a6;hb=aa0b485f3dca72c5448076e913fa54d948cd7731;hp=89a81833d08308bfea5ed3303f6a9f2fac242118;hpb=f10062dfdbacb48910482678d919ad37de57015f;p=friendica.git diff --git a/include/enotify.php b/include/enotify.php index 89a81833d0..732c1d7b43 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -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); @@ -592,7 +597,7 @@ function check_item_notification($itemid, $uid, $notification_type) { $fields = ['id', 'uri-id', 'mention', 'parent', 'parent-uri-id', 'title', 'body', 'author-link', 'author-name', 'author-avatar', 'author-id', 'guid', 'parent-uri', 'uri', 'contact-id', 'network']; - $condition = ['id' => $itemid, 'gravity' => [GRAVITY_PARENT, GRAVITY_COMMENT], 'deleted' => false]; + $condition = ['id' => $itemid, 'deleted' => false]; $item = Item::selectFirstForUser($uid, $fields, $condition); if (!DBA::isResult($item)) { return false;