diff --git a/apps/desktop/src/chat/ChatWidget.tsx b/apps/desktop/src/chat/ChatWidget.tsx index af70455..acacacd 100644 --- a/apps/desktop/src/chat/ChatWidget.tsx +++ b/apps/desktop/src/chat/ChatWidget.tsx @@ -612,7 +612,7 @@ export function ChatWidget({ ticketId, ticketRef }: ChatWidgetProps) { setIsSending(true) try { - const bodyToSend = messageText || (attachmentsToSend.length > 0 ? "[Anexo]" : "") + const bodyToSend = messageText const cfg = await ensureConfig() await invoke("send_chat_message", { baseUrl: cfg.apiBaseUrl, @@ -814,6 +814,9 @@ export function ChatWidget({ ticketId, ticketRef }: ChatWidgetProps) { // No desktop: isFromMachine=true significa mensagem do cliente (maquina) // Layout igual à web: cliente à esquerda, agente à direita const isAgent = !msg.isFromMachine + const bodyText = msg.body.trim() + const shouldShowBody = + bodyText.length > 0 && !(bodyText === "[Anexo]" && (msg.attachments?.length ?? 0) > 0) return (
{msg.body}
+ {shouldShowBody &&{msg.body}
} {/* Anexos */} {msg.attachments && msg.attachments.length > 0 && ({msg.body}
- )} + {shouldShowBody &&{msg.body}
} {/* Anexos da mensagem */} {msg.attachments && msg.attachments.length > 0 && (