diff --git a/include/class.ticket.php b/include/class.ticket.php index 21a4bd8f1777e100d839dedaf44525c61455f381..60d26d7eb31ba73f5b176a47168314d4bf166f6f 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -1549,8 +1549,11 @@ class Ticket { $attachments = $note->getAttachments(); $sentlist=array(); foreach( $recipients as $k=>$staff) { - if(!$staff || !is_object($staff) || !$staff->getEmail() || !$staff->isAvailable()) continue; - if(in_array($staff->getEmail(), $sentlist) || ($staffId && $staffId==$staff->getId())) continue; + if(!is_object($staff) + || !$staff->isAvailable() //Don't bother vacationing staff. + || in_array($staff->getEmail(), $sentlist) //No duplicates. + || $note->getStaffId() == $staff->getId()) //No need to alert the poster! + continue; $alert = str_replace('%{recipient}', $staff->getFirstName(), $msg['body']); $email->sendAlert($staff->getEmail(), $msg['subj'], $alert, $attachments); $sentlist[] = $staff->getEmail();