Bugfixing Home
[friendica.git/.git] / include / conversation.php
index c82bbe5..85938ca 100644 (file)
@@ -806,7 +806,9 @@ function conversation_fetch_comments($thread_items) {
                        $actor = ['link' => $row['author-link'], 'avatar' => $row['author-avatar'], 'name' => $row['author-name']];
                        $created = $row['created'];
                }
-               if ($row['gravity'] == GRAVITY_PARENT) {
+
+               if ((($row['gravity'] == GRAVITY_PARENT) && !$row['origin'] && !in_array($row['network'], [Protocol::DIASPORA])) &&
+                       (empty($row['contact-uid']) || !in_array($row['network'], Protocol::NATIVE_SUPPORT))) {
                        $parentlines[] = $lineno;
                }
 
@@ -818,11 +820,9 @@ function conversation_fetch_comments($thread_items) {
 
        if (!empty($actor)) {
                foreach ($parentlines as $line) {
-                       if (!in_array($comments[$line]['network'], [Protocol::DIASPORA]) && !$comments[$line]['origin']) {
-                               $comments[$line]['owner-link'] = $actor['link'];
-                               $comments[$line]['owner-avatar'] = $actor['avatar'];
-                               $comments[$line]['owner-name'] = $actor['name'];
-                       }
+                       $comments[$line]['owner-link'] = $actor['link'];
+                       $comments[$line]['owner-avatar'] = $actor['avatar'];
+                       $comments[$line]['owner-name'] = $actor['name'];
                }
        }
        return $comments;