mirror of
https://github.com/flarum/core.git
synced 2025-07-24 18:21:33 +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)
|
private function getPostIds(ServerRequestInterface $request)
|
||||||
{
|
{
|
||||||
|
$actor = $request->getAttribute('actor');
|
||||||
$filter = $this->extractFilter($request);
|
$filter = $this->extractFilter($request);
|
||||||
$sort = $this->extractSort($request);
|
$sort = $this->extractSort($request);
|
||||||
$limit = $this->extractLimit($request);
|
$limit = $this->extractLimit($request);
|
||||||
$offset = $this->extractOffset($request);
|
$offset = $this->extractOffset($request);
|
||||||
|
|
||||||
$query = $this->posts->query();
|
$query = $this->posts->query()->whereVisibleTo($actor);
|
||||||
|
|
||||||
$this->applyFilters($query, $filter);
|
$this->applyFilters($query, $filter);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user