Suppress "reshared" information for forum posts
This commit is contained in:
parent
62ce87dfe6
commit
1934c149a3
1 changed files with 10 additions and 1 deletions
|
@ -712,8 +712,13 @@ function conversation_fetch_comments($thread_items, $pinned) {
|
||||||
$lineno = 0;
|
$lineno = 0;
|
||||||
$actor = [];
|
$actor = [];
|
||||||
$received = '';
|
$received = '';
|
||||||
|
$owner = '';
|
||||||
|
|
||||||
while ($row = Item::fetch($thread_items)) {
|
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'])) {
|
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']];
|
$actor = ['link' => $row['author-link'], 'avatar' => $row['author-avatar'], 'name' => $row['author-name']];
|
||||||
$received = $row['received'];
|
$received = $row['received'];
|
||||||
|
@ -724,6 +729,10 @@ function conversation_fetch_comments($thread_items, $pinned) {
|
||||||
$parentlines[] = $lineno;
|
$parentlines[] = $lineno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (($row['gravity'] == GRAVITY_PARENT) && ($row['author-link'] != $row['owner-link'])) {
|
||||||
|
$owner = $row['owner-link'];
|
||||||
|
}
|
||||||
|
|
||||||
if ($row['gravity'] == GRAVITY_PARENT) {
|
if ($row['gravity'] == GRAVITY_PARENT) {
|
||||||
$row['pinned'] = $pinned;
|
$row['pinned'] = $pinned;
|
||||||
}
|
}
|
||||||
|
@ -765,7 +774,7 @@ function conversation_add_children(array $parents, $block_authors, $order, $uid)
|
||||||
$max_comments = DI::config()->get('system', 'max_display_comments', 1000);
|
$max_comments = DI::config()->get('system', 'max_display_comments', 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
$params = ['order' => ['uid', 'commented' => true]];
|
$params = ['order' => ['gravity', 'uid', 'commented' => true]];
|
||||||
|
|
||||||
if ($max_comments > 0) {
|
if ($max_comments > 0) {
|
||||||
$params['limit'] = $max_comments;
|
$params['limit'] = $max_comments;
|
||||||
|
|
Loading…
Reference in a new issue