mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 05:32:49 +08:00
Fix regression: set actor before eager loading user state
This commit is contained in:
parent
322a84f516
commit
0ab1f2cfe7
|
@ -12,6 +12,7 @@
|
|||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Api\Serializer\DiscussionSerializer;
|
||||
use Flarum\Discussion\Discussion;
|
||||
use Flarum\Discussion\Search\DiscussionSearcher;
|
||||
use Flarum\Http\UrlGenerator;
|
||||
use Flarum\Search\SearchCriteria;
|
||||
|
@ -93,6 +94,8 @@ class ListDiscussionsController extends AbstractListController
|
|||
$results->areMoreResults() ? null : 0
|
||||
);
|
||||
|
||||
Discussion::setStateUser($actor);
|
||||
|
||||
$results = $results->getResults()->load($load);
|
||||
|
||||
if ($relations = array_intersect($load, ['startPost', 'lastPost'])) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user