diff --git a/app/Jobs/Ai/StreamPostCreation.php b/app/Jobs/Ai/StreamPostCreation.php index 6b53dd05..73e84729 100644 --- a/app/Jobs/Ai/StreamPostCreation.php +++ b/app/Jobs/Ai/StreamPostCreation.php @@ -89,7 +89,7 @@ public function handle(): void $structured = $response->structured ?? []; $humanizeFormat = $isCarousel ? 'carousel' : $agentFormat; - $structured = $this->humanize($workspace, $structured, $humanizeFormat); + $structured = $this->humanize($workspace, $structured, $humanizeFormat, $this->template); $generated = $style->assemble($structured, $context); $post = $this->createPostFromGenerated($workspace, $generated, $socialAccount); @@ -116,9 +116,9 @@ public function handle(): void * @param array $structured * @return array */ - private function humanize(Workspace $workspace, array $structured, string $format): array + private function humanize(Workspace $workspace, array $structured, string $format, string $styleKey = 'image_card'): array { - if ($format === 'tweet_card') { + if ($styleKey === 'tweet_card') { return $structured; }