Baileys icon indicating copy to clipboard operation
Baileys copied to clipboard

[BUG] Double receive message with thumbnail

Open zennn08 opened this issue 2 years ago • 10 comments

Describe the bug This bug doesn't always happen. This bug occurs when someone sends a message with a thumbnail and the message is receive 2x at the same time. image

To Reproduce Steps to reproduce the behavior:

  1. Created a new connection
  2. Send A messages with thumbnail

Expected behavior Only receive one time

Environment (please complete the following information):

  • Is this on a server? Yes
  • What do your connectOptions look like?
{
       printQRInTerminal: false,
       auth: state,
       logger: P({ level: "silent" })
       getMessage: messageRetryHandler
}
  • Do you have multiple clients on the same IP? Yes
  • Are you using a proxy? No

zennn08 avatar Aug 12 '22 08:08 zennn08

any solution?

zennn08 avatar Aug 18 '22 11:08 zennn08

I'm not much off topic, but how did you manage to display link thumbnails in the first place? They do not work for me, can you help, how do you send a message?

itmor avatar Aug 20 '22 23:08 itmor

This issue is stale because it has been open 6 days with no activity. Remove the stale label or comment or this will be closed in 2 days

github-actions[bot] avatar Aug 27 '22 03:08 github-actions[bot]

.

zennn08 avatar Aug 28 '22 03:08 zennn08

This issue is stale because it has been open 6 days with no activity. Remove the stale label or comment or this will be closed in 2 days

github-actions[bot] avatar Sep 03 '22 03:09 github-actions[bot]

.

zennn08 avatar Sep 03 '22 03:09 zennn08

This issue is stale because it has been open 6 days with no activity. Remove the stale label or comment or this will be closed in 2 days

github-actions[bot] avatar Sep 10 '22 03:09 github-actions[bot]

any solutions?

zhinea avatar Sep 10 '22 10:09 zhinea

This issue is stale because it has been open 6 days with no activity. Remove the stale label or comment or this will be closed in 2 days

github-actions[bot] avatar Sep 18 '22 04:09 github-actions[bot]

.

zennn08 avatar Sep 18 '22 09:09 zennn08

.

Eu acho que sei qual o problema com essa mensagem dupla, na verdade ela não está duplicada, tem ids diferentes oque leva a crer que ao invés de enviar mensagem dupla ele recebeu duas mensagens iguais no messages.upsert

undefined-60 avatar Sep 23 '22 10:09 undefined-60

.

Eu acho que sei qual o problema com essa mensagem dupla, na verdade ela não está duplicada, tem ids diferentes oque leva a crer que ao invés de enviar mensagem dupla ele recebeu duas mensagens iguais no messages.upsert

Uma implementação simples acaba com este problema. Salve o id das mensagens recebidas em alguma variável etc... E sempre verifique se você já tem este id salvo, se tiver a mensagem veio duplicada, funcionou bem no meu caso. Não obtive mais esse problema.

undefined-60 avatar Sep 23 '22 10:09 undefined-60

This issue is stale because it has been open 6 days with no activity. Remove the stale label or comment or this will be closed in 2 days

github-actions[bot] avatar Sep 30 '22 04:09 github-actions[bot]