FIX: Ticket new message notification sent twice

This commit is contained in:
Benjamin Falière
2024-04-04 11:44:22 +02:00
parent cdf46276ac
commit 8156fbfea3

View File

@@ -2572,10 +2572,9 @@ class Ticket extends CommonObject
continue;
}
if ($info_sendto['email'] != '') {
if (!empty($info_sendto['email'])) {
$sendto[] = dolGetFirstLastname($info_sendto['firstname'], $info_sendto['lastname'])." <".$info_sendto['email'].">";
}
// We check if the email address is not the assignee's address to prevent notification from being sent twice
if (!empty($info_sendto['email']) && $assigned_user->email != $info_sendto['email']) {
$sendto[] = dolGetFirstLastname($info_sendto['firstname'], $info_sendto['lastname'])." <".$info_sendto['email'].">";
}
}