From ec205c06a38c1514e78ed30afa771a227bc77694 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Mon, 20 Jan 2014 17:25:38 -0600
Subject: [PATCH] oops: Don't send collaborator email to ticket owner

---
 include/class.ticket.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/class.ticket.php b/include/class.ticket.php
index 78058d548..e8235b49e 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -990,9 +990,13 @@ class Ticket {
         $uid = 0;
         if ($entry instanceof Message) {
             $poster = $entry->getUser();
+            // Skip the person who sent in the message
             $uid = $entry->getUserId();
-        } else
+        } else {
             $poster = $entry->getStaff();
+            // Skip the ticket owner
+            $uid = $this->getUserId();
+        }
 
         $vars = array(
                 'message' => (string) $entry,
-- 
GitLab