Remove an "if"

This commit is contained in:
Michael 2020-09-28 14:13:14 +00:00
parent 5cf369c026
commit 415a3a7926

View File

@ -1006,11 +1006,10 @@ function builtin_activity_puller($item, &$conv_responses) {
} }
// Skip when the causer of the parent is the same than the author of the announce // Skip when the causer of the parent is the same than the author of the announce
if ($verb == Activity::ANNOUNCE) { if (($verb == Activity::ANNOUNCE) && Item::exists(['uri' => $item['thr-parent'],
if (Item::exists(['uri' => $item['thr-parent'], 'uid' => $item['uid'], 'causer-id' => $item['author-id'], 'gravity' => GRAVITY_PARENT])) { 'uid' => $item['uid'], 'causer-id' => $item['author-id'], 'gravity' => GRAVITY_PARENT])) {
continue; continue;
} }
}
if (!isset($conv_responses[$mode][$item['thr-parent']])) { if (!isset($conv_responses[$mode][$item['thr-parent']])) {
$conv_responses[$mode][$item['thr-parent']] = 1; $conv_responses[$mode][$item['thr-parent']] = 1;