Closed ferd1995 closed 1 year ago
Whatsmeow seems to cache the message before send to facilitate message retry in the future.
This maybe happen after you send a message and then restarted the connection, this will cause all previously cached message lost.
So before you send the message (waProto *Message
) you need to store the message in persistent storage.
And after that provide an implementation to client.GetMessageForRetry(requester, to types.JID, id types.MessageID)
function to fetch the message that needs to be retried.
Thansk for the reply @Serenity-77 .
I found out where we need to overwrite GetMessageForRetry in the client and I have an idea of how to do it.
However, it seems we need the MessageID before sending the message in order to cache it and retrieve it using MessageID in GetMessageForRetry. Is it possible to have the ID before sending the message?
EDIT: Nevermind, we call whatsapp.GenerateMessageID() beforehand! I think we have the solution now!
Some messages are not sent, because the log reports the following message
Any idea?