Fix sharing detection on reshares

This commit is contained in:
Michael 2020-08-20 02:49:02 +00:00
parent 17dbffe824
commit 707af437e2

View file

@ -2026,13 +2026,13 @@ class Item
return;
}
if (Contact::getIdForURL($parent['author-link'], $item['uid'])) {
if (($author['contact-type'] != Contact::TYPE_COMMUNITY) && Contact::isSharing($parent['author-link'], $item['uid'])) {
logger::info('The parent author is a user contact: quit', ['author' => $parent['author-link'], 'uid' => $item['uid']]);
return;
}
$cid = Contact::getIdForURL($author['url'], $item['uid']);
if (empty($cid)) {
if (empty($cid) || !Contact::isSharing($cid, $item['uid'])) {
logger::info('The resharer is not a user contact: quit', ['resharer' => $author['url'], 'uid' => $item['uid']]);
return;
}