Fix issue where posts API doesn't return the right amount of posts (#2291)

This commit is contained in:
Wadim Kalmykov 2020-09-18 10:59:34 +07:00 committed by GitHub
parent c6e85ef330
commit 633cc14d09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,12 +108,13 @@ class ListPostsController extends AbstractListController
*/
private function getPostIds(ServerRequestInterface $request)
{
$actor = $request->getAttribute('actor');
$filter = $this->extractFilter($request);
$sort = $this->extractSort($request);
$limit = $this->extractLimit($request);
$offset = $this->extractOffset($request);
$query = $this->posts->query();
$query = $this->posts->query()->whereVisibleTo($actor);
$this->applyFilters($query, $filter);