mirror of
https://github.com/friendica/friendica
synced 2024-12-23 02:00:17 +00:00
Merge pull request #14148 from annando/summary
Use the field for the summary instead of the "abstract" element
This commit is contained in:
commit
d788cb82cc
3 changed files with 7 additions and 7 deletions
|
@ -121,7 +121,7 @@ class Item
|
|||
const DELIVER_FIELDLIST = [
|
||||
'uid', 'id', 'parent', 'uri-id', 'uri', 'thr-parent', 'parent-uri', 'guid',
|
||||
'parent-guid', 'conversation', 'received', 'created', 'edited', 'verb', 'object-type', 'object', 'target',
|
||||
'private', 'title', 'body', 'raw-body', 'language', 'location', 'coord', 'app', 'sensitive',
|
||||
'private', 'title', 'content-warning', 'body', 'raw-body', 'language', 'location', 'coord', 'app', 'sensitive',
|
||||
'inform', 'deleted', 'extid', 'post-type', 'post-reason', 'gravity',
|
||||
'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid',
|
||||
'author-id', 'author-addr', 'author-link', 'author-name', 'author-avatar', 'owner-id', 'owner-link', 'contact-uid',
|
||||
|
|
|
@ -1160,11 +1160,11 @@ class Transmitter
|
|||
// - Moving the title into the "summary" field that is used as a "content warning"
|
||||
|
||||
if (!$use_title) {
|
||||
$mail['body'] = '[abstract]' . $mail['title'] . "[/abstract]\n" . $mail['body'];
|
||||
$mail['title'] = '';
|
||||
$mail['content-warning'] = $mail['title'];
|
||||
$mail['title'] = '';
|
||||
} else {
|
||||
$mail['content-warning'] = '';
|
||||
}
|
||||
|
||||
$mail['content-warning'] = '';
|
||||
$mail['sensitive'] = false;
|
||||
$mail['author-link'] = $mail['owner-link'] = $mail['from-url'];
|
||||
$mail['owner-id'] = $mail['author-id'];
|
||||
|
@ -1780,7 +1780,7 @@ class Transmitter
|
|||
return $data;
|
||||
}
|
||||
|
||||
$data['summary'] = BBCode::toPlaintext(BBCode::getAbstract($item['body'], Protocol::ACTIVITYPUB));
|
||||
$data['summary'] = $item['content-warning'] ?: BBCode::toPlaintext(BBCode::getAbstract($item['body'], Protocol::ACTIVITYPUB));
|
||||
|
||||
if ($item['uri'] != $item['thr-parent']) {
|
||||
$data['inReplyTo'] = $item['thr-parent'];
|
||||
|
|
|
@ -674,7 +674,7 @@ class Feed
|
|||
}
|
||||
} else {
|
||||
if (!empty($summary)) {
|
||||
$item['body'] = '[abstract]' . HTML::toBBCode($summary, $basepath) . "[/abstract]\n" . $item['body'];
|
||||
$item['content-warning'] = HTML::toBBCode($summary, $basepath);
|
||||
}
|
||||
|
||||
if ($fetch_further_information == LocalRelationship::FFI_KEYWORD) {
|
||||
|
|
Loading…
Reference in a new issue