X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FFeed.php;h=42f470e23f1ba01f2b33bd48c592ccb8658201c7;hb=b84c68f02455ea6d2a4384229535c45d6426fe4b;hp=a86d9f98f59bf78fd0531b1f5c457cae9e28077c;hpb=befc2af5043a3afde251721c0d27df695db1bb7e;p=friendica.git diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index a86d9f98f5..42f470e23f 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -29,11 +29,9 @@ use Friendica\Content\Text\HTML; use Friendica\Core\Cache\Duration; use Friendica\Core\Logger; use Friendica\Core\Protocol; -use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\Conversation; use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\Tag; @@ -41,6 +39,7 @@ use Friendica\Model\User; use Friendica\Util\DateTimeFormat; use Friendica\Util\Network; use Friendica\Util\ParseUrl; +use Friendica\Util\Proxy; use Friendica\Util\Strings; use Friendica\Util\XML; @@ -235,6 +234,7 @@ class Feed $header["private"] = Item::PUBLIC; $header["verb"] = Activity::POST; $header["object-type"] = Activity\ObjectType::NOTE; + $header["post-type"] = Item::PT_ARTICLE; $header["contact-id"] = $contact["id"] ?? 0; @@ -539,6 +539,10 @@ class Feed } } + if (empty($item['title'])) { + $item['post-type'] = Item::PT_NOTE; + } + Logger::info('Stored feed', ['item' => $item]); $notify = Item::isRemoteSelf($contact, $item); @@ -954,7 +958,7 @@ class Feed XML::addElement($doc, $root, "id", DI::baseUrl() . "/profile/" . $owner["nick"]); XML::addElement($doc, $root, "title", $title); XML::addElement($doc, $root, "subtitle", sprintf("Updates from %s on %s", $owner["name"], DI::config()->get('config', 'sitename'))); - XML::addElement($doc, $root, "logo", $owner["photo"]); + XML::addElement($doc, $root, "logo", Contact::getAvatarUrlForId($owner['id'], Proxy::SIZE_SMALL, $owner['updated'])); XML::addElement($doc, $root, "updated", DateTimeFormat::utcNow(DateTimeFormat::ATOM)); $author = self::addAuthor($doc, $owner);