Skip to content

Commit b4a99f0

Browse files
authored
Fix notification_to_myself handling with manually collected emails
1 parent fdd4d24 commit b4a99f0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/NotificationEvent.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ public static function raiseEvent($event, $item, $options = [], ?CommonDBTM $tri
159159
$notify_me = false;
160160
$emitter = null;
161161

162-
if (Session::isCron()) {
162+
if (
163+
Session::isCron() // Ticket has been created by a crontask
164+
|| isCommandLine() // Ticket has been created by a CLI command
165+
|| isset($_SESSION['mailcollector_user']) // Ticket has been created by the mail collector (even manually)
166+
) {
163167
// Cron notify me
164168
$notify_me = true;
165169

0 commit comments

Comments
 (0)