X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FFeed.php;h=7d778ee582bb2836486147b418d10e291c800b83;hb=ee5acc29c3722de9b48c11fe0d6316a83f43f1de;hp=63a9fbfbdc79ae9c4eb2b17ea4bbc06f2947bc1f;hpb=1874a32728142f2c12724562eb122eb1cd1370fe;p=friendica.git diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 63a9fbfbdc..7d778ee582 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -376,11 +376,11 @@ class Feed } if ($published != '') { - $item['created'] = $published; + $item['created'] = trim($published); } if ($updated != '') { - $item['edited'] = $updated; + $item['edited'] = trim($updated); } if (!$dryRun) { @@ -624,12 +624,14 @@ class Feed Logger::info('Stored feed', ['item' => $item]); $notify = Item::isRemoteSelf($contact, $item); + $item['wall'] = (bool)$notify; // Distributed items should have a well-formatted URI. // Additionally, we have to avoid conflicts with identical URI between imported feeds and these items. if ($notify) { - $item['guid'] = Item::guidFromUri($orig_plink, DI::baseUrl()->getHostname()); - $item['uri'] = Item::newURI($item['guid']); + $item['guid'] = Item::guidFromUri($orig_plink, DI::baseUrl()->getHost()); + $item['uri'] = Item::newURI($item['guid']); + unset($item['plink']); unset($item['thr-parent']); unset($item['parent-uri']); @@ -1121,7 +1123,7 @@ class Feed XML::addElement($doc, $entry, 'id', $item['uri']); XML::addElement($doc, $entry, 'title', html_entity_decode($title, ENT_QUOTES, 'UTF-8')); - $body = OStatus::formatPicturePost($item['body'], $item['uri-id']); + $body = Post\Media::addAttachmentsToBody($item['uri-id'], DI::contentItem()->addSharedPost($item)); $body = BBCode::convertForUriId($item['uri-id'], $body, BBCode::ACTIVITYPUB);