X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FConversation.php;h=04cdab4785e50b0e5efefbdddb322fe8b015e963;hb=65b86fe0d556829c09e8c8f5c707b868ad37dfe1;hp=4ad1890a267ecc60e40d6276bb18f4cd32116aa3;hpb=1e7a55180a3740f4b6e5ed8dd40ecb6b9d84cbc4;p=friendica.git diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 4ad1890a26..04cdab4785 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -37,6 +37,7 @@ use Friendica\Core\Theme; use Friendica\Database\DBA; use Friendica\Model\Contact; use Friendica\Model\Item as ItemModel; +use Friendica\Model\Photo; use Friendica\Model\Post; use Friendica\Model\Tag; use Friendica\Model\User; @@ -659,16 +660,6 @@ class Conversation $pinned = ''; } - if (in_array($item['network'], [Protocol::FEED, Protocol::MAIL])) { - $owner_avatar = $author_avatar = $item['contact-id']; - $owner_updated = $author_updated = ''; - } else { - $owner_avatar = $item['owner-id']; - $owner_updated = $item['owner-updated']; - $author_avatar = $item['author-id']; - $author_updated = $item['author-updated']; - } - $tmp_item = [ 'template' => $tpl, 'id' => ($preview ? 'P0' : $item['id']), @@ -686,7 +677,7 @@ class Conversation 'name' => $profile_name, 'sparkle' => $sparkle, 'lock' => false, - 'thumb' => $this->baseURL->remove(Contact::getAvatarUrlForId($author_avatar, Proxy::SIZE_THUMB, $author_updated)), + 'thumb' => $this->baseURL->remove($this->item->getAuthorAvatar($item)), 'title' => $title, 'body_html' => $body_html, 'tags' => $tags['tags'], @@ -707,7 +698,7 @@ class Conversation 'indent' => '', 'owner_name' => '', 'owner_url' => '', - 'owner_photo' => $this->baseURL->remove(Contact::getAvatarUrlForId($owner_avatar, Proxy::SIZE_THUMB, $owner_updated)), + 'owner_photo' => $this->baseURL->remove($this->item->getOwnerAvatar($item)), 'plink' => ItemModel::getPlink($item), 'edpost' => false, 'pinned' => $pinned, @@ -963,7 +954,7 @@ class Conversation $condition = DBA::mergeConditions($condition, ["`uid` IN (0, ?) AND (`vid` != ? OR `vid` IS NULL)", $uid, Verb::getID(Activity::FOLLOW)]); - $thread_parents = Post::select(['uri-id', 'causer-id'], $condition, ['order' => ['uri-id' => false, 'uid' => true]]); + $thread_parents = Post::select(['uri-id', 'causer-id'], $condition, ['order' => ['uri-id' => false, 'uid']]); $thr_parent = [];