X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapisearchjson.php;h=4b46109b982e1d1988e3531a0c0539d641aa8f43;hb=4694d068f965ec733edcfe5c9afe8244ae01f00a;hp=424773f12bf6bb41e7aea20b4ca780f447e764d8;hpb=d4e76bc25b5bdcb47d8d267fcb7b9f3b9f0b9585;p=quix0rs-gnu-social.git diff --git a/actions/apisearchjson.php b/actions/apisearchjson.php index 424773f12b..4b46109b98 100644 --- a/actions/apisearchjson.php +++ b/actions/apisearchjson.php @@ -118,7 +118,16 @@ class ApiSearchJSONAction extends ApiPrivateAuthAction $search_engine->limit(($this->page - 1) * $this->rpp, $this->rpp + 1); if ($search_engine->query($this->query)) { $cnt = $notice->find(); - $this->notices = $notice->fetchAll(); + foreach ($notice->fetchAll() as $testNotice) { + // Must be true + assert($testNotice instanceof Notice); + + // Check scope of notice to current profile (including guests) + if ($testNotice->isCurrentProfileInScope()) { + // In scope + $this->notices[] = $testNotice; + } + } // END - if } $this->showJsonTimeline($this->notices);