tulir / whatsmeow

Go library for the WhatsApp web multidevice API
https://go.mau.fi/whatsmeow
Mozilla Public License 2.0
2.25k stars 418 forks source link

Issue when send first message #10

Closed bhavesh53 closed 2 years ago

bhavesh53 commented 3 years ago

hello , i am getting weird problem . when ever i send message to any number first time its shows error to receiver's mobile . from 2nd message onwords its working fine . shows waiting for this message.This may takes a while.

139803571-fea86aab-5f6e-4756-a9c2-01ef308c8c1b

Romerito007 commented 3 years ago

Same, second message sends.

Romerito007 commented 3 years ago

When I send the first message [Client WARN] Failed to fetch prekey for 552220400210.0:1@s.whatsapp.net: invalid prekey in prekey response: prekey node doesn't contain ID tag

gabrielphilipes commented 2 years ago

Hi!

I'm having this problem, the first message I send is always waiting to be received.

Arrived is there any solution?

Romerito007 commented 2 years ago

I resolved by saving message data, when I get retry I send messages again.

Maybe this commit could handle it somehow

Valdenirmezadri commented 2 years ago

Hello Romero,

in this case, do you send the revoke message and resend message as a new message?

Romerito007 commented 2 years ago

I send the same data with the same id

beshoo commented 2 years ago

Even if it works, It will affect your number since it is not a normal pattern to send messages in WhatsApp

On Fri, Nov 12, 2021 at 3:30 PM Romerito Alexandre @.***> wrote:

Hi! I'm having this problem, the first message I send is always waiting to be received. Arrived is there any solution?

I resolved by saving message data, when I get retry I send messages again. Maybe this commit could handle it somehow https://github.com/tulir/whatsmeow/blob/main/receipt.go#L23

Hello Romero,

in this case, do you send the revoke message and resend message as a new message?

I send the same data with the same id

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tulir/whatsmeow/issues/10#issuecomment-967119776, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDLT277I3RR23KYKEAXO7TULUJGTANCNFSM5HFX3LRA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Romerito007 commented 2 years ago

You can resend here https://github.com/tulir/whatsmeow/blob/main/retry.go#L167, you already have the message data

Valdenirmezadri commented 2 years ago

but being a private function, how do you call it? because it's not automatic

Romerito007 commented 2 years ago

I I edited, maybe someone has a better approach

ramacatur commented 2 years ago

but being a private function, how do you call it? because it's not automatic

I think this is automatically send retry message.

https://github.com/tulir/whatsmeow/blob/main/receipt.go#L25

But, my message still waiting.

Romerito007 commented 2 years ago

but being a private function, how do you call it? because it's not automatic

I think this is automatically send retry message.

https://github.com/tulir/whatsmeow/blob/main/receipt.go#L25

But, my message still waiting.

I believe so.

ramacatur commented 2 years ago

but being a private function, how do you call it? because it's not automatic

I think this is automatically send retry message. https://github.com/tulir/whatsmeow/blob/main/receipt.go#L25 But, my message still waiting.

I believe so.

i just tried to send to a number that is not in contacts. Message is still waiting and my number is blocked.

Romerito007 commented 2 years ago

but being a private function, how do you call it? because it's not automatic

I think this is automatically send retry message. https://github.com/tulir/whatsmeow/blob/main/receipt.go#L25 But, my message still waiting.

I believe so.

i just tried to send to a number that is not in contacts. Message is still waiting and my number is blocked.

add cli.SendMessage(receipt.Chat, messageID, msg) below the line, take the tests

Valdenirmezadri commented 2 years ago

but being a private function, how do you call it? because it's not automatic

I think this is automatically send retry message. https://github.com/tulir/whatsmeow/blob/main/receipt.go#L25 But, my message still waiting.

I believe so.

i just tried to send to a number that is not in contacts. Message is still waiting and my number is blocked.

add cli.SendMessage(receipt.Chat, messageID, msg) below the line, take the tests

It worked, ty Romerito

Romerito007 commented 2 years ago

@Valdenirmezadri be careful when adding this function to cli.SendMessage(receibo.Chat, messageID, msg), when sending message to verified accounts, it will cause a loop. uses this number as an example of tests 551131361384

Valdenirmezadri commented 2 years ago

be careful when adding this function to cli.SendMessage(receibo.Chat, messageID, msg), when sending message to verified accounts, it will cause a loop. uses this number as an example of tests 551131361384

if I've already verified that the account exists, you say?

Valdenirmezadri commented 2 years ago

i made this pull #25

tulir commented 2 years ago

Responding to retry receipts should work properly now