diff options
-rw-r--r-- | app/class/mesg.class.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/class/mesg.class.php b/app/class/mesg.class.php index da52fa6..2512d03 100644 --- a/app/class/mesg.class.php +++ b/app/class/mesg.class.php @@ -297,14 +297,14 @@ class mesg extends object if (!$parent) return true; - $rcpt = $this->getMembers(); - $rcpt[] = $this->getOwner(); + $rcpt = $parent->getMembers(); + $rcpt[] = $parent->getOwner(); switch ($parent->objtype) { case "user": $rcpt[] = $parent; - $subj = $this->author . " PM from " . $this->getAuthor()->getDisplayName(); + $subj = $this->author . " " . $this->getAuthor()->getDisplayName() . " // " . $this->name; break; case "issue": @@ -322,11 +322,15 @@ class mesg extends object } $rcpt = object::arrayUnique($rcpt); + $author = $this->author; + $rcpt = array_filter($rcpt, function ($val) use($author) { return $val->guid != $author; }); $attachPath = ($this->getAttachment() ? "dynmic/attach/" . $this->guid : NULL); + $mesg = $this->getAuthor()->getDisplayName() . " wrote on " . $this->created . "\n\n"; + $mesg .= $this->renderMesg(); foreach ($rcpt as $r) { - if (!$r->sendEmail($subj, $this->mesg, $attachPath, $this->attachment)) + if (!$r->sendEmail($subj, $mesg, $attachPath, $this->attachment)) return false; } |