X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fconversation.php;h=1c9c37d24a7c872d9a0ca2f06c477c55d505f05e;hb=aa0b485f3dca72c5448076e913fa54d948cd7731;hp=8969bfd4b6d215c9c04130b34952fd596dd6c7f6;hpb=1934c149a32cd3844741d531c0c568fbbe192496;p=friendica.git diff --git a/include/conversation.php b/include/conversation.php index 8969bfd4b6..1c9c37d24a 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -708,48 +708,17 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o */ function conversation_fetch_comments($thread_items, $pinned) { $comments = []; - $parentlines = []; - $lineno = 0; - $actor = []; - $received = ''; - $owner = ''; while ($row = Item::fetch($thread_items)) { - if (($row['verb'] == Activity::ANNOUNCE) && ($row['author-link'] == $owner)) { - continue; - } - - if (($row['verb'] == Activity::ANNOUNCE) && !empty($row['contact-uid']) && ($row['received'] > $received) && ($row['thr-parent'] == $row['parent-uri'])) { - $actor = ['link' => $row['author-link'], 'avatar' => $row['author-avatar'], 'name' => $row['author-name']]; - $received = $row['received']; - } - - 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; - } - - if (($row['gravity'] == GRAVITY_PARENT) && ($row['author-link'] != $row['owner-link'])) { - $owner = $row['owner-link']; - } - if ($row['gravity'] == GRAVITY_PARENT) { $row['pinned'] = $pinned; } $comments[] = $row; - $lineno++; } DBA::close($thread_items); - if (!empty($actor)) { - foreach ($parentlines as $line) { - $comments[$line]['owner-link'] = $actor['link']; - $comments[$line]['owner-avatar'] = $actor['avatar']; - $comments[$line]['owner-name'] = $actor['name']; - } - } return $comments; }