Skip to content

Commit 78ce706

Browse files
authored
Fix(notification): fix missing attachment (#328)
1 parent d493fb5 commit 78ce706

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [UNRELEASED]
99

10+
### Fixed
11+
12+
- Fix missing attachment from notification
13+
1014
## [1.8.10] - 2025-12-05
1115

1216
### Fixed

inc/notificationevent.class.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static function raiseEvent($event, $item, $options = [], $label = '')
5757

5858
$options['entities_id'] = 0; //New code
5959
$notificationtarget = NotificationTarget::getInstance($item, $event, $options);
60-
if (!$notificationtarget) {
60+
if (!$notificationtarget || !($notificationtarget instanceof PluginMreportingNotificationTargetNotification)) {
6161
return false;
6262
}
6363

@@ -76,6 +76,7 @@ public static function raiseEvent($event, $item, $options = [], $label = '')
7676
$notificationtarget->setMode($data['mode']);
7777
$notificationtarget->setEvent($eventClass);
7878
$notificationtarget->clearAddressesList();
79+
$notificationtarget->addDataForTemplate($event, $options);
7980

8081
//Process more infos (for example for tickets)
8182
$notificationtarget->addAdditionnalInfosForTarget();
@@ -126,7 +127,7 @@ public static function raiseEvent($event, $item, $options = [], $label = '')
126127
$users_infos,
127128
$options,
128129
),
129-
[],
130+
$notificationtarget->additionalData,
130131
);
131132
} else {
132133
$notificationtarget->getFromDB($target['id']);

0 commit comments

Comments
 (0)