From c55d94d969473100c4f18d7849b2ecaa3642947f Mon Sep 17 00:00:00 2001 From: FreeScout Date: Fri, 5 Jan 2024 08:35:15 -0800 Subject: [PATCH] Add alternative reply separation method - closes #3648 --- app/Console/Commands/FetchEmails.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/FetchEmails.php b/app/Console/Commands/FetchEmails.php index 220247b33..778746648 100644 --- a/app/Console/Commands/FetchEmails.php +++ b/app/Console/Commands/FetchEmails.php @@ -605,7 +605,7 @@ public function processMessage($message, $message_id, $mailbox, $mailboxes, $ext $body = $message->getTextBody() ?? ''; $body = htmlspecialchars($body); } - $body = $this->separateReply($body, $is_html, $is_reply, !$message_from_customer, ($message_from_customer ? $prev_thread->getMessageId($mailbox) : '')); + $body = $this->separateReply($body, $is_html, $is_reply, !$message_from_customer, (($message_from_customer && $prev_thread) ? $prev_thread->getMessageId($mailbox) : '')); // We have to fetch absolutely all emails, even with empty body. // if (!$body) {