Summary has to be converted to HTML / Don't use summary when we have the source

This commit is contained in:
Michael 2019-03-17 00:06:31 +00:00
parent 54f48c1eb0
commit 0104da3c93
2 changed files with 21 additions and 15 deletions

View file

@ -1021,7 +1021,7 @@ class Transmitter
return $data;
}
$data['summary'] = BBCode::getAbstract($item['body'], Protocol::ACTIVITYPUB);
$data['summary'] = BBCode::convert(BBCode::getAbstract($item['body'], Protocol::ACTIVITYPUB), false, 7);
if ($item['uri'] != $item['thr-parent']) {
$data['inReplyTo'] = $item['thr-parent'];
@ -1056,7 +1056,7 @@ class Transmitter
if ($type == 'Note') {
$body = self::removePictures($body);
} elseif (($type == 'Article') && empty($data['summary'])) {
$data['summary'] = Plaintext::shorten(self::removePictures($body), 1000);
$data['summary'] = BBCode::convert(Plaintext::shorten(self::removePictures($body), 1000), false, 7);
}
if ($type == 'Event') {