]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/ActivityPub/Objects.php
Merge pull request #13093 from annando/emoji-comments
[friendica.git] / src / Module / ActivityPub / Objects.php
index fd3a2d66c34717532dcfebb27d3f0fdda0681026..34d4609511447a577b32b413badac788dd331ed6 100644 (file)
@@ -29,7 +29,6 @@ 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;
@@ -57,7 +56,7 @@ class Objects extends BaseModule
                        Logger::info('Provided GUID found.', ['guid' => $this->parameters['guid'], 'uri-id' => $itemuri['id']]);
                } else {
                        // The item URI does not always contain the GUID. This means that we have to search the URL instead
-                       $url = DI::baseUrl()->get() . '/' . DI::args()->getQueryString();
+                       $url = DI::baseUrl() . '/' . DI::args()->getQueryString();
                        $nurl = Strings::normaliseLink($url);
                        $ssl_url = str_replace('http://', 'https://', $nurl);
 
@@ -75,9 +74,7 @@ class Objects extends BaseModule
                        throw new HTTPException\NotFoundException();
                }
 
-               $owner = User::getById($item['uid'], ['hidewall']);
-
-               $validated = empty($owner['hidewall']) && in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]);
+               $validated = in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]);
 
                if (!$validated) {
                        $requester = HTTPSignature::getSigner('', $_SERVER);