Merge pull request #893 from mexon/mat/mailstream-plaintext

[mailstream] Include BB code as plaintext
This commit is contained in:
Hypolite Petovan 2019-09-28 08:19:19 -04:00 committed by GitHub
commit bed44a389c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -299,6 +299,7 @@ function mailstream_send(\Friendica\App $a, $message_id, $item, $user) {
$mail->IsHTML(true);
$mail->CharSet = 'utf-8';
$template = Renderer::getMarkupTemplate('mail.tpl', 'addon/mailstream/');
$mail->AltBody = BBCode::toPlaintext($item['body']);
$item['body'] = BBCode::convert($item['body']);
$item['url'] = $a->getBaseURL() . '/display/' . $item['guid'];
$mail->Body = Renderer::replaceMacros($template, [