mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 05:53:37 +08:00
Fix issue where posts API doesn't return the right amount of posts (#2291)
This commit is contained in:
parent
c6e85ef330
commit
633cc14d09
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user