1
0
mirror of https://github.com/flarum/core.git synced 2025-07-23 17:51:24 +02:00

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

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);