From: Michael Date: Wed, 30 Nov 2022 09:28:27 +0000 (+0000) Subject: Check that an auto reshare is only done on the expected contact X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a01cdccb05b2db46a43272a0bfd6c7bab8787118;p=friendica.git Check that an auto reshare is only done on the expected contact --- diff --git a/src/Model/Item.php b/src/Model/Item.php index cb998c0fdc..89925c532b 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -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; }