Fix sharing detection on reshares

pull/9038/head
Michael 2020-08-20 02:49:02 +00:00
parent 17dbffe824
commit 707af437e2
1 changed files with 2 additions and 2 deletions

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;
}