X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fenotify.php;h=6b3171dda6d6cd2102ae9035cbd746201602a79a;hb=1a385153f89487113e2aa07a5ceba31914f513c5;hp=ae2e2e7fefba2526e381350dfd9b00861f5f8cf2;hpb=df7eb7fcc5260c727173a221b8a64cf0278d7890;p=friendica.git diff --git a/include/enotify.php b/include/enotify.php index ae2e2e7fef..6b3171dda6 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -465,7 +465,7 @@ function notification($params) if ($show_in_notification_page) { $notification = DI::notify()->insert([ 'name' => $params['source_name'] ?? '', - 'name_cache' => substr(strip_tags(BBCode::convert($params['source_name'] ?? '')), 0, 255), + 'name_cache' => substr(strip_tags(BBCode::convert($params['source_name'])), 0, 255), 'url' => $params['source_link'] ?? '', 'photo' => $params['source_photo'] ?? '', 'link' => $itemlink ?? '', @@ -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);