X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fconversation.php;h=f3df8db0152c9e84bc8ea4c10924ae6c460140e6;hb=9cd9ad647d0a81d29ee3091b99776ee63a27e622;hp=6f8c28d72510d49ae20dfcb778b217e89767e96e;hpb=90e0cae84ec46f8df01b9da0905b188901666635;p=friendica.git diff --git a/include/conversation.php b/include/conversation.php index 6f8c28d725..f3df8db015 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -585,6 +585,10 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o 'template' => $tpl, 'id' => ($preview ? 'P0' : $item['id']), 'guid' => ($preview ? 'Q0' : $item['guid']), + 'commented' => $item['commented'], + 'received' => $item['received'], + 'created_date' => $item['created'], + 'uriid' => $item['uri-id'], 'network' => $item['network'], 'network_name' => ContactSelector::networkToName($item['author-network'], $item['author-link'], $item['network']), 'network_icon' => ContactSelector::networkToIcon($item['network'], $item['author-link']), @@ -734,7 +738,7 @@ function conversation_fetch_comments($thread_items, $pinned) { $row['direction'] = ['direction' => 4, 'title' => DI::l10n()->t('Tagged')]; break; case Item::PT_ANNOUNCEMENT: - if (!empty($row['causer-id']) && DI::pConfig()->get(local_user(), 'system', 'display_resharer') ) { + if (!empty($row['causer-id']) && DI::pConfig()->get(local_user(), 'system', 'display_resharer')) { $row['owner-link'] = $row['causer-link']; $row['owner-avatar'] = $row['causer-avatar']; $row['owner-name'] = $row['causer-name']; @@ -1006,11 +1010,9 @@ function builtin_activity_puller($item, &$conv_responses) { } // Skip when the causer of the parent is the same than the author of the announce - if ($verb == Activity::ANNOUNCE) { - $parent = Item::selectFirst(['causer-id', 'gravity'], ['uri' => $item['thr-parent']]); - if (($parent['causer-id'] == $item['author-id']) && ($parent['gravity'] == GRAVITY_PARENT)) { - continue; - } + if (($verb == Activity::ANNOUNCE) && Item::exists(['uri' => $item['thr-parent'], + 'uid' => $item['uid'], 'causer-id' => $item['author-id'], 'gravity' => GRAVITY_PARENT])) { + continue; } if (!isset($conv_responses[$mode][$item['thr-parent']])) {