]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Conversation.php
Blanks replaced
[friendica.git] / src / Content / Conversation.php
index 89d9ca4c1b712e59de059595a3e8ce6b662bd30e..04cdab4785e50b0e5efefbdddb322fe8b015e963 100644 (file)
@@ -660,27 +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 = '';
-                                               $owner_thumb   = $author_thumb   = $item['contact-avatar'];
-                                       } else {
-                                               $owner_avatar   = $item['owner-id'];
-                                               $owner_updated  = $item['owner-updated'];
-                                               $owner_thumb    = $item['owner-avatar'];
-                                               $author_avatar  = $item['author-id'];
-                                               $author_updated = $item['author-updated'];
-                                               $author_thumb   = $item['author-avatar'];
-                                       }
-
-                                       if (empty($owner_thumb) || Photo::isPhotoURI($owner_thumb)) {
-                                               $owner_thumb = Contact::getAvatarUrlForId($owner_avatar, Proxy::SIZE_THUMB, $owner_updated);
-                                       }
-                       
-                                       if (empty($author_thumb) || Photo::isPhotoURI($author_thumb)) {
-                                               $author_thumb = Contact::getAvatarUrlForId($author_avatar, Proxy::SIZE_THUMB, $author_updated);
-                                       }
-
                                        $tmp_item = [
                                                'template'             => $tpl,
                                                'id'                   => ($preview ? 'P0' : $item['id']),
@@ -698,7 +677,7 @@ class Conversation
                                                'name'                 => $profile_name,
                                                'sparkle'              => $sparkle,
                                                'lock'                 => false,
-                                               'thumb'                => $this->baseURL->remove($author_thumb),
+                                               'thumb'                => $this->baseURL->remove($this->item->getAuthorAvatar($item)),
                                                'title'                => $title,
                                                'body_html'            => $body_html,
                                                'tags'                 => $tags['tags'],
@@ -719,7 +698,7 @@ class Conversation
                                                'indent'               => '',
                                                'owner_name'           => '',
                                                'owner_url'            => '',
-                                               'owner_photo'          => $this->baseURL->remove($owner_thumb),
+                                               'owner_photo'          => $this->baseURL->remove($this->item->getOwnerAvatar($item)),
                                                'plink'                => ItemModel::getPlink($item),
                                                'edpost'               => false,
                                                'pinned'               => $pinned,