fix: dynamic list body fallback uses ?: to handle empty string
WhatsApp rejects list messages with empty body.text. Using ?? missed empty string from config; ?: correctly falls back to default. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
322aa287dc
commit
6bac0ee823
@@ -251,7 +251,7 @@ class NormalBot
|
||||
$interactive = [
|
||||
'type' => 'list',
|
||||
'header' => ['type' => 'text', 'text' => mb_substr($flow['header'] ?? 'Selecciona', 0, 60)],
|
||||
'body' => ['text' => mb_substr($flow['body'] ?? 'Elige una opción:', 0, 1024)],
|
||||
'body' => ['text' => mb_substr($flow['body'] ?: 'Elige una opción:', 0, 1024)],
|
||||
'footer' => ['text' => mb_substr($company['display_name'] ?? '', 0, 60)],
|
||||
'action' => [
|
||||
'button' => mb_substr($flow['button'] ?? 'Ver opciones', 0, 20),
|
||||
|
||||
Reference in New Issue
Block a user