]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/ActivityPub/Objects.php
Merge pull request #12429 from MrPetovan/bug/contactblock-icon
[friendica.git] / src / Module / ActivityPub / Objects.php
index 96b3f638e789660df8790608e392712b78ca3914..8c8109d667ca99ac2d8a7a0a798f789a6c44f1bb 100644 (file)
@@ -29,6 +29,7 @@ use Friendica\DI;
 use Friendica\Model\Contact;
 use Friendica\Model\Item;
 use Friendica\Model\Post;
+use Friendica\Model\User;
 use Friendica\Network\HTTPException;
 use Friendica\Protocol\ActivityPub;
 use Friendica\Util\HTTPSignature;
@@ -74,7 +75,9 @@ class Objects extends BaseModule
                        throw new HTTPException\NotFoundException();
                }
 
-               $validated = in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]);
+               $owner = User::getById($item['uid'], ['hidewall']);
+
+               $validated = empty($owner['hidewall']) && in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]);
 
                if (!$validated) {
                        $requester = HTTPSignature::getSigner('', $_SERVER);
@@ -97,7 +100,7 @@ class Objects extends BaseModule
                $last_modified = $item['changed'];
                Network::checkEtagModified($etag, $last_modified);
 
-               if (empty($this->parameters['activity']) && ($item['gravity'] != GRAVITY_ACTIVITY)) {
+               if (empty($this->parameters['activity']) && ($item['gravity'] != Item::GRAVITY_ACTIVITY)) {
                        $activity = ActivityPub\Transmitter::createCachedActivityFromItem($item['id'], false, true);
                        if (empty($activity['type'])) {
                                throw new HTTPException\NotFoundException();