Rhymen / go-whatsapp

WhatsApp Web API
MIT License
2.05k stars 490 forks source link

Whatsapp says message wasn't sent, but it was #566

Closed paulocsanz closed 3 years ago

paulocsanz commented 3 years ago

Hey, today we started experiencing a weird issue on whatsapp.

Some of our clients send messages using go-whatsapp and they are appearing with the red exclamation point next to them, like if they weren't sent at all. But the other person is in fact receiving them (and replying to them).

image

We are suspecting that this has something to do with whatsapp-web's version change, and since go-whatsappuses an older version is making the app confused.

It seems wise that the community documents and investigates more this version change, because it may start causing real problems soon.

ramacatur commented 3 years ago

Same issue. However, for WhatsApp applications that have not been updated, this does not happen.

ramacatur commented 3 years ago

I've found solution and it worked

Whatsapp changes the status value in the node format, where previously it was 0 (error) to 1 (pending). so in the message.go file, Send(msg interface{}), before

ch, err := wac.sendProto(msgProto)

Add this code to change status:

status := proto.WebMessageInfo_PENDING
msgProto.Status = &status

Try this solution

Thanks

leonetosoft commented 3 years ago

Same issue.

leonetosoft commented 3 years ago

status := proto.WebMessageInfo_PENDING msgProto.Status = &status

image

Solved! Tanks @ramacatur

beshoo commented 3 years ago

Please make a PL

Regard

On Thu, Jun 10, 2021, 7:18 PM Leonardo Neto @.***> wrote:

status := proto.WebMessageInfo_PENDING msgProto.Status = &status

[image: image] https://user-images.githubusercontent.com/3596786/121560818-e153ee80-c9e5-11eb-8e2b-97b9a4930534.png

Solved! Tanks @ramacatur https://github.com/ramacatur

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Rhymen/go-whatsapp/issues/566#issuecomment-858760202, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDLT2YF2YKF4U7OHGQPRJ3TSDQULANCNFSM46MGLIFQ .

leonetosoft commented 3 years ago

@beshoo I think it's fair that @ramacatur does it because he found the solution! Or do you want me to do it?

leonetosoft commented 3 years ago

Thanks @ramacatur for providing my first PR

ramacatur commented 3 years ago

Thanks @ramacatur for providing my first PR

Ok, you are welcome.

rhsobr commented 3 years ago

Thanks @leonetosoft for the PR

jairforero commented 3 years ago

status := proto.WebMessageInfo_PENDING msgProto.Status = &status

image

¡resuelto! Tanques @ramacatur

Excelente , Very tks!!

rafaelaraujobsb commented 3 years ago

@ramacatur thank you!

What did you do to discover this solution? Did you decrypt the message whatsapp web was sending?

ramacatur commented 3 years ago

@ramacatur thank you!

What did you do to discover this solution? Did you decrypt the message whatsapp web was sending?

Yes, decrypt binary message in whatsapp web.

aryahmph commented 2 years ago

Still not working