From 6c701b335d45cd8b0490677e3fda260439605405 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 30 Aug 2025 05:27:14 -0600 Subject: [PATCH] Update StoryComposeController, add StoryIndexService support --- app/Http/Controllers/StoryComposeController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Http/Controllers/StoryComposeController.php b/app/Http/Controllers/StoryComposeController.php index e190352b9..636ac6eaf 100644 --- a/app/Http/Controllers/StoryComposeController.php +++ b/app/Http/Controllers/StoryComposeController.php @@ -14,6 +14,7 @@ use App\Notification; use App\Report; use App\Services\FollowerService; use App\Services\MediaPathService; +use App\Services\StoryIndexService; use App\Services\StoryService; use App\Services\UserRoleService; use App\Status; @@ -222,6 +223,9 @@ class StoryComposeController extends Controller $story->can_react = $request->input('can_react'); $story->save(); + $index = app(StoryIndexService::class); + $index->indexStory($story); + StoryService::delLatest($story->profile_id); StoryFanout::dispatch($story)->onQueue('story'); StoryService::addRotateQueue($story->id); @@ -243,6 +247,9 @@ class StoryComposeController extends Controller $story->active = false; $story->save(); + $index = app(StoryIndexService::class); + $index->removeStory($story->id, $story->profile_id); + StoryDelete::dispatch($story)->onQueue('story'); return [