From 4f823f35989aac6423da0d043737c067bc1b3e59 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 17 Mar 2015 11:02:02 -0500
Subject: [PATCH] alerts: Consider "alert assigned on new message"

When sending alerts to agents, consider the setting of the new message alert
configuration.
---
 include/class.ticket.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/class.ticket.php b/include/class.ticket.php
index e7546870e..2a42ff9c3 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -1718,8 +1718,7 @@ class Ticket {
                 $recipients[]=$this->getLastRespondent();
 
             //Assigned staff if any...could be the last respondent
-
-            if ($this->isAssigned()) {
+            if ($cfg->alertAssignedONNewMessage() && $this->isAssigned()) {
                 if ($staff = $this->getStaff())
                     $recipients[] = $staff;
                 elseif ($team = $this->getTeam())
-- 
GitLab