diff --git a/CHANGELOG.md b/CHANGELOG.md index fc3d9991..c0b3c28f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [UNRELEASED] +### Fixed + +- Fix missing attachment from notification + ## [1.8.10] - 2025-12-05 ### Fixed diff --git a/inc/notificationevent.class.php b/inc/notificationevent.class.php index 4142c11f..a7286728 100644 --- a/inc/notificationevent.class.php +++ b/inc/notificationevent.class.php @@ -57,7 +57,7 @@ public static function raiseEvent($event, $item, $options = [], $label = '') $options['entities_id'] = 0; //New code $notificationtarget = NotificationTarget::getInstance($item, $event, $options); - if (!$notificationtarget) { + if (!$notificationtarget || !($notificationtarget instanceof PluginMreportingNotificationTargetNotification)) { return false; } @@ -76,6 +76,7 @@ public static function raiseEvent($event, $item, $options = [], $label = '') $notificationtarget->setMode($data['mode']); $notificationtarget->setEvent($eventClass); $notificationtarget->clearAddressesList(); + $notificationtarget->addDataForTemplate($event, $options); //Process more infos (for example for tickets) $notificationtarget->addAdditionnalInfosForTarget(); @@ -126,7 +127,7 @@ public static function raiseEvent($event, $item, $options = [], $label = '') $users_infos, $options, ), - [], + $notificationtarget->additionalData, ); } else { $notificationtarget->getFromDB($target['id']);