Feature: Soporte para caption en imágenes/videos

- Telegram: Procesar caption de fotos y videos con botones de traducción
- Discord: Ignorar mensajes vacíos (solo attachments sin texto)
- Si no hay caption/texto, los bots no procesan nada
- Si hay caption/texto, se traduce normalmente

Cambios:
- telegram/webhook/telegram_bot_webhook.php: Agregar procesamiento de $caption
- discord_bot.php: Agregar validación de texto vacío
- handleTelegramMessage: Ignorar textos vacíos
- handleAutoTranslationWithButtons: Ignorar textos vacíos
This commit is contained in:
2026-02-19 16:01:46 -06:00
parent 3519853bb6
commit 0c053ab036
2 changed files with 27 additions and 7 deletions

View File

@@ -331,6 +331,11 @@ function sendToN8NIA(Message $message, string $userMessage): void
function handleAutoTranslationWithButtons(PDO $pdo, Message $message, string $text): void
{
try {
// Si no hay texto, ignorar (ej: solo imagen/video sin caption)
if (empty(trim($text))) {
return;
}
require_once __DIR__ . '/src/Translate.php';
$translator = new src\Translate();