Now it works

This commit is contained in:
Michael 2019-11-23 12:54:39 +00:00
parent fda30bbb1f
commit 84244b1450

View file

@ -129,12 +129,14 @@ class Email
if (trim($ret['body']) == '') { if (trim($ret['body']) == '') {
$ret['body'] = self::messageGetPart($mbox, $uid, $struc, 0, 'plain'); $ret['body'] = self::messageGetPart($mbox, $uid, $struc, 0, 'plain');
$message = ['text' => $ret['body'], 'html' => '']; $message = ['text' => $ret['body'], 'html' => '', 'item' => $ret];
Hook::callAll('email_getmessage', $message, $ret); Hook::callAll('email_getmessage', $message);
$ret = $message['item'];
$ret['body'] = $message['text']; $ret['body'] = $message['text'];
} else { } else {
$message = ['text' => '', 'html' => $ret['body']]; $message = ['text' => '', 'html' => $ret['body'], 'item' => $ret];
Hook::callAll('email_getmessage', $message, $ret); Hook::callAll('email_getmessage', $message);
$ret = $message['item'];
$ret['body'] = $message['html']; $ret['body'] = $message['html'];
$ret['body'] = HTML::toBBCode($ret['body']); $ret['body'] = HTML::toBBCode($ret['body']);
@ -154,8 +156,9 @@ class Email
} }
} }
$message = ['text' => trim($text), 'html' => trim($html)]; $message = ['text' => trim($text), 'html' => trim($html), 'item' => $ret];
Hook::callAll('email_getmessage', $message, $ret); Hook::callAll('email_getmessage', $message);
$ret = $message['item'];
$html = $message['html']; $html = $message['html'];
$text = $message['text']; $text = $message['text'];