Skip to content

Duplicação de mensagem com múltiplos anexos no Chatwoot #1468

@eronGreco

Description

@eronGreco

Welcome!

  • Yes, I have searched for similar issues on GitHub and found none.

What did you do?

Enviei uma mensagem usando o Chatwoot, integrado com a Evolution API (WhatsApp), contendo um texto e múltiplos arquivos anexos (ex: PDFs) em uma única interação.


Sent a message using Chatwoot, integrated with Evolution API, with a text message and multiple file attachments (e.g., PDFs) in a single interaction.

What did you expect?

Esperava que a mensagem de texto fosse enviada apenas uma vez, seguida pelos arquivos anexos, mantendo o contexto e sem gerar repetições desnecessárias.


I expected the text message to be sent only once, followed by the files as separate attachments or grouped in a single conversation flow, maintaining the context and avoiding repetition.

What did you observe instead of what you expected?

A mensagem de texto é repetida várias vezes — uma vez para cada arquivo anexado.

Exemplo:

  • Se envio uma mensagem com 2 PDFs anexados, o destinatário no WhatsApp recebe duas mensagens de texto idênticas, cada uma acompanhando um dos arquivos.
  • Isso gera confusão e dá a entender que a mesma mensagem está sendo reenviada várias vezes

The text message is repeated multiple times — once for each attached file.

Example:

  • If I send one message with 2 PDFs attached, the recipient on WhatsApp receives two identical text messages, each one followed by a different PDF.
  • This causes confusion and makes it appear that the same message is being resent.

Screenshots/Videos

No response

Which version of the API are you using?

v2.2.3

What is your environment?

Windows

Other environment specifications

No response

If applicable, paste the log output

Não há erros visíveis nos logs — o sistema processa e envia as mensagens normalmente. O bug parece estar relacionado à forma como o sistema trata múltiplos anexos quando há uma mensagem de texto vinculada.


There are no visible errors in the logs — the system processes and sends the messages as if everything is fine. The bug appears to be in how the system handles multiple attachments with a shared message.

Additional Notes

Esse comportamento pode estar relacionado ao uso de um loop que reenvia a mesma mensagem de texto junto de cada arquivo. Uma solução possível seria agrupar os anexos sob um mesmo contexto de mensagem ou marcar a mensagem de texto como já enviada dentro daquele batch.


This bug seems related to how the API iterates over each file and reuses the same text block, without checking if it’s already been sent. A possible fix could involve grouping attachments under a single message context or flagging the text as already sent for that batch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions