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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user