]> git.mxchange.org Git - friendica.git/commitdiff
Now it works
authorMichael <heluecht@pirati.ca>
Sat, 23 Nov 2019 12:54:39 +0000 (12:54 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 23 Nov 2019 12:54:39 +0000 (12:54 +0000)
src/Protocol/Email.php

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