Merge pull request #12299 from annando/auto-reshare-fix

Check that an auto reshare is only done on the expected contact
This commit is contained in:
Hypolite Petovan 2022-11-30 08:34:10 -05:00 committed by GitHub
commit 7402bc9f50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -2271,6 +2271,11 @@ class Item
return;
}
$cdata = Contact::getPublicAndUserContactID($item['author-id'], $item['uid']);
if (empty($cdata['user']) || ($cdata['user'] != $item['contact-id'])) {
return;
}
if (!DBA::exists('contact', ['id' => $item['contact-id'], 'remote_self' => Contact::MIRROR_NATIVE_RESHARE])) {
return;
}