Hook::callAll('atom_feed_end', $atom);
Hook::callAll('atom_feed_end', $atom);
+### src/Protocol/Email.php
+
+ Hook::callAll('email_getmessage', $message);
+ Hook::callAll('email_getmessage_end', $ret);
+
### view/js/main.js
document.dispatchEvent(new Event('postprocess_liveupdate'));
Hook::callAll('atom_feed_end', $atom);
Hook::callAll('atom_feed_end', $atom);
+
+### src/Protocol/Email.php
+
+ Hook::callAll('email_getmessage', $message);
+ Hook::callAll('email_getmessage_end', $ret);
*/
namespace Friendica\Protocol;
+use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Content\Text\HTML;
use Friendica\Model\Item;
if (trim($ret['body']) == '') {
$ret['body'] = self::messageGetPart($mbox, $uid, $struc, 0, 'plain');
} else {
+ $message = ['text' => '', 'html' => $ret['body']];
+ Hook::callAll('email_getmessage', $message);
+ $ret['body'] = $message['html'];
+
$ret['body'] = HTML::toBBCode($ret['body']);
}
} else {
$html .= $x;
}
}
- if (trim($html) != '') {
+
+ $message = ['text' => trim($text), 'html' => trim($html)];
+ Hook::callAll('email_getmessage', $message);
+ $html = $message['html'];
+ $text = $message['text'];
+
+ if (!empty($html)) {
$ret['body'] = HTML::toBBCode($html);
} else {
$ret['body'] = $text;
$ret['body'] = self::unifyAttributionLine($ret['body']);
+ Hook::callAll('email_getmessage_end', $ret);
+
return $ret;
}
- // At the moment - only return plain/text.
- // Later we'll repackage inline images as data url's and make the HTML safe
/**
+ * fetch the specified message part number with the specified subtype
+ *
* @param resource $mbox mailbox
* @param integer $uid user id
* @param object $p parts