Skip to content

Commit

Permalink
Fix lastPost summary not updating after new post
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Jan 11, 2021
1 parent 2f98213 commit 4cc3bea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace IanM\Synopsis;

use Flarum\Api\Controller\ListDiscussionsController;
use Flarum\Api\Controller\UpdateDiscussionController;
use Flarum\Extend;

return [
Expand All @@ -38,6 +39,9 @@
(new Extend\ApiController(ListDiscussionsController::class))
->addInclude(['firstPost', 'lastPost']),

(new Extend\ApiController(UpdateDiscussionController::class))
->addInclude(['lastPost']),

(new Extend\User())
->registerPreference('showSynopsisExcerpts', function ($value) {
return (bool) $value;
Expand Down

0 comments on commit 4cc3bea

Please sign in to comment.