X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FFeed.php;h=0cf1db7cb799dcafe5789157953c3767f4fe265e;hb=fa3b5f2bbd3a24d44ce3de3663df3ad4766dd6d2;hp=3981a8860cbf4c3f949885634bf9b703015c01a0;hpb=4a95ca280d665eda09529f91eb28b517a471e683;p=friendica.git diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 3981a8860c..0cf1db7cb7 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -356,11 +356,20 @@ class Feed { if (empty($body)) { $body = trim(XML::getFirstNodeValue($xpath, 'content:encoded/text()', $entry)); } - if (empty($body)) { - $body = trim(XML::getFirstNodeValue($xpath, 'description/text()', $entry)); + + $summary = trim(XML::getFirstNodeValue($xpath, 'atom:summary/text()', $entry)); + + if (empty($summary)) { + $summary = trim(XML::getFirstNodeValue($xpath, 'description/text()', $entry)); } + if (empty($body)) { - $body = trim(XML::getFirstNodeValue($xpath, 'atom:summary/text()', $entry)); + $body = $summary; + $summary = ''; + } + + if ($body == $summary) { + $summary = ''; } // remove the content of the title if it is identically to the body @@ -411,6 +420,10 @@ class Feed { $item["object-type"] = ACTIVITY_OBJ_BOOKMARK; unset($item["attach"]); } else { + if (!empty($summary)) { + $item["body"] = '[abstract]' . HTML::toBBCode($summary, $basepath) . "[/abstract]\n" . $item["body"]; + } + if ($contact["fetch_further_information"] == 3) { if (!empty($tags)) { $item["tag"] = $tags;