Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

fix(ai-templates): skip humanizer for tweet_card style regardless of carousel mode

Paulo Castellano8317b83d6b6c
diff --git a/app/Jobs/Ai/StreamPostCreation.php b/app/Jobs/Ai/StreamPostCreation.php
index 6b53dd054..73e847291 100644
--- a/app/Jobs/Ai/StreamPostCreation.php
+++ b/app/Jobs/Ai/StreamPostCreation.php
@@ -89,7 +89,7 @@ class StreamPostCreation implements ShouldQueue
$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 @@ class StreamPostCreation implements ShouldQueue
* @param array<string, mixed> $structured
* @return array<string, mixed>
*/
- 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;
}