X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FModel%2FItem.php;h=6c3fa58eb3b84b0bc15f3e610dfb7a1d086e7000;hb=f3fd99da6028fbc9fd657802fbf3f7db290476e7;hp=330ac43c8965d60da546b7051dffda2188f2d256;hpb=7c5aa0bbf167ec58e48625ca254d4518d8ac622b;p=friendica.git diff --git a/src/Model/Item.php b/src/Model/Item.php index 330ac43c89..6c3fa58eb3 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2028,7 +2028,7 @@ class Item */ private static function setOwnerforResharedItem(array $item) { - $parent = self::selectFirst(['id', 'owner-id', 'author-id', 'author-link', 'origin', 'post-type'], + $parent = self::selectFirst(['id', 'causer-id', 'owner-id', 'author-id', 'author-link', 'origin', 'post-type'], ['uri-id' => $item['thr-parent-id'], 'uid' => $item['uid']]); if (!DBA::isResult($parent)) { Logger::error('Parent not found', ['uri-id' => $item['thr-parent-id'], 'uid' => $item['uid']]); @@ -2048,6 +2048,11 @@ class Item } if ($author['contact-type'] != Contact::TYPE_COMMUNITY) { + if ($parent['post-type'] == self::PT_ANNOUNCEMENT) { + Logger::info('The parent is already marked as announced: quit', ['causer' => $parent['causer-id'], 'owner' => $parent['owner-id'], 'author' => $parent['author-id'], 'uid' => $item['uid']]); + return; + } + if (Contact::isSharing($parent['owner-id'], $item['uid'])) { Logger::info('The resharer is no forum: quit', ['resharer' => $item['author-id'], 'owner' => $parent['owner-id'], 'author' => $parent['author-id'], 'uid' => $item['uid']]); return;