From d5ed197e5d61d138e835bff59801dec5e282ae8b Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 9 Sep 2014 18:44:35 -0500
Subject: [PATCH] email: Import embedded images before truncating the body

---
 include/class.thread.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/class.thread.php b/include/class.thread.php
index d47e3113a..9a6be978c 100644
--- a/include/class.thread.php
+++ b/include/class.thread.php
@@ -1411,9 +1411,9 @@ class TextThreadBody extends ThreadBody {
 }
 class HtmlThreadBody extends ThreadBody {
     function __construct($body, $options=array()) {
+        if ($options['strip-embedded'])
+            $body = $this->extractEmbeddedHtmlImages($body);
         parent::__construct($body, 'html', $options);
-        if ($this->options['strip-embedded'])
-            $this->body = $this->extractEmbeddedHtmlImages($this->body);
     }
 
     function extractEmbeddedHtmlImages($body) {
-- 
GitLab