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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user