diff --git a/include/class.task.php b/include/class.task.php index 55f0152896da820a1897076c884596659bc462e4..fe1e71921766846433ec0e245adcc2ce1ae7690a 100644 --- a/include/class.task.php +++ b/include/class.task.php @@ -1189,7 +1189,7 @@ class Task extends TaskModel implements RestrictedAccess, Threadable { global $cfg; if (!$entry instanceof ThreadEntry - || !($recipients=$this->getThread()->getParticipants()) + || !($recipients=$this->getThread()->getRecipients()) || !($dept=$this->getDept()) || !($tpl=$dept->getTemplate()) || !($msg=$tpl->getTaskActivityNoticeMsgTemplate()) diff --git a/include/class.thread.php b/include/class.thread.php index 343b3e9005689e01a11ef5611e3a00179b776f82..a9485d0b85477e339e6d4fc3cbe4ae978a15abb6 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -263,6 +263,17 @@ implements Searchable { return $this->_participants; } + // MailingList of recipients (collaborators) + function getRecipients() { + $list = new MailingList(); + if ($collabs = $this->getActiveCollaborators()) { + foreach ($collabs as $c) + $list->addCc($c); + } + + return $list; + } + function getReferral($id, $type) { return $this->referrals->findFirst(array( diff --git a/include/class.util.php b/include/class.util.php index a3bc2305d130c8b7bf5885cc4df99f4dcf1cae22..e78c00d1d56347ccacdc1c0ca0702bc91ea65ba1 100644 --- a/include/class.util.php +++ b/include/class.util.php @@ -5,6 +5,7 @@ require_once INCLUDE_DIR . 'class.variable.php'; // Used by the email system interface EmailContact { function getId(); + function getUserId(); function getName(); function getEmail(); } @@ -28,6 +29,10 @@ implements EmailContact { return $this->contact->getId(); } + function getUserId() { + return $this->contact->getUserId(); + } + function getEmail() { return $this->contact->getEmail(); }