]> git.mxchange.org Git - friendica.git/commitdiff
For feed items show the avatar of the local user
authorMichael <heluecht@pirati.ca>
Wed, 9 May 2018 21:09:16 +0000 (21:09 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 9 May 2018 21:09:16 +0000 (21:09 +0000)
src/Object/Post.php

index 820730a32b9e01a4942af6b24c3eeca6a82d3eb3..54cea63e9b9dc9003e1d77ab3f7fb15b8788fb88 100644 (file)
@@ -199,22 +199,12 @@ class Post extends BaseObject
                        $profile_link = Profile::zrl($profile_link);
                }
 
-               if (!isset($item['author-thumb']) || ($item['author-thumb'] == "")) {
-                       $author_contact = Contact::getDetailsByURL($item['author-link'], $conv->getProfileOwner());
-                       if ($author_contact["thumb"]) {
-                               $item['author-thumb'] = $author_contact["thumb"];
-                       } else {
-                               $item['author-thumb'] = $item['author-avatar'];
-                       }
+               if (($item['network'] == NETWORK_FEED) || empty($item['author-thumb'])) {
+                       $item['author-thumb'] = $item['author-avatar'];
                }
 
-               if (!isset($item['owner-thumb']) || ($item['owner-thumb'] == "")) {
-                       $owner_contact = Contact::getDetailsByURL($item['owner-link'], $conv->getProfileOwner());
-                       if ($owner_contact["thumb"]) {
-                               $item['owner-thumb'] = $owner_contact["thumb"];
-                       } else {
-                               $item['owner-thumb'] = $item['owner-avatar'];
-                       }
+               if (($item['network'] == NETWORK_FEED) || empty($item['owner-thumb'])) {
+                       $item['owner-thumb'] = $item['owner-avatar'];
                }
 
                $locate = ['location' => $item['location'], 'coord' => $item['coord'], 'html' => ''];