From: Cyperghost Date: Wed, 11 Sep 2024 10:29:04 +0000 (+0200) Subject: Load embedded content before the email text is processed. X-Git-Tag: 6.1.0_Beta_2~1^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a9b7a3f7176e0b1458906046b9a3db4af50f28ea;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.conversation.git Load embedded content before the email text is processed. --- diff --git a/files/lib/data/conversation/message/ConversationMessage.class.php b/files/lib/data/conversation/message/ConversationMessage.class.php index 4dec86e..3f61b3c 100644 --- a/files/lib/data/conversation/message/ConversationMessage.class.php +++ b/files/lib/data/conversation/message/ConversationMessage.class.php @@ -8,6 +8,7 @@ use wcf\data\DatabaseObject; use wcf\data\IMessage; use wcf\data\TUserContent; use wcf\system\html\output\HtmlOutputProcessor; +use wcf\system\message\embedded\object\MessageEmbeddedObjectManager; use wcf\system\request\LinkHandler; use wcf\system\WCF; use wcf\util\StringUtil; @@ -107,6 +108,13 @@ class ConversationMessage extends DatabaseObject implements IMessage */ public function getMailText($mimeType = 'text/plain'): string { + if ($this->hasEmbeddedObjects) { + MessageEmbeddedObjectManager::getInstance()->loadObjects( + 'com.woltlab.wcf.conversation.message', + [$this->messageID] + ); + } + switch ($mimeType) { case 'text/plain': $processor = new HtmlOutputProcessor();