Merge pull request #9308 from annando/duplicate-reshare

Don't display a resharer that was the causer of the post
2022.09-rc
Tobias Diekershoff 2020-09-28 14:31:32 +02:00 zatwierdzone przez GitHub
commit 6ee8aa889c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -1005,6 +1005,14 @@ function builtin_activity_puller($item, &$conv_responses) {
continue;
}
// 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 (!isset($conv_responses[$mode][$item['thr-parent']])) {
$conv_responses[$mode][$item['thr-parent']] = 1;
} else {