]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Item.php
Decouple conversation creation from rendering
[friendica.git] / src / Content / Item.php
index 49193627f63b37f8e8a38d0951c0f65a1f5890a6..bd3c6d774b8d55abe702604c3c7176f4a75a7c16 100644 (file)
@@ -309,7 +309,7 @@ class Item
                                        'id'      => $item['author-id'],
                                        'network' => $item['author-network'],
                                        'url'     => $item['author-link'],
-                                       'alias'   => $item['author-lias'],
+                                       'alias'   => $item['author-alias'],
                                ];
                                $author  = '[url=' . Contact::magicLinkByContact($author_arr) . ']' . $item['author-name'] . '[/url]';
 
@@ -537,6 +537,14 @@ class Item
                        $item['private'] = $private_group ? ItemModel::PRIVATE : ItemModel::UNLISTED;
 
                        if ($only_to_group) {
+                               $cdata = Contact::getPublicAndUserContactID($group_contact['id'], $item['uid']);
+                               if (!empty($cdata['user'])) {
+                                       $item['owner-id'] = $cdata['user'];
+                                       unset($item['owner-link']);
+                                       unset($item['owner-name']);
+                                       unset($item['owner-avatar']);
+                               }
+       
                                $item['postopts'] = '';
                        }