This will solve the problem of being unable to send messages with a quote attached.
How Has This Been Tested
I've tested this version with my local Node.js install (system/os details can be found in the mentioned issue).
I've tried sending a couple of messages in private and group chats. With both messages from me and others. It has also been tested on a clean install (without auth).
Types of changes
[ ] Dependency change
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
[x] My code follows the code style of this project.
[x] I have updated the documentation accordingly (index.d.ts).
Now using
window.Store.Msg.getMessagesById
instead ofwindow.Store.Msg.get
PR Details
This PR fixes the exception that was thrown when using
client.sendMessage()
with aquotedMessageId
in theMessageSendOptions
parameter.Description
It seemed like
window.Store.get()
couldn't get a message, even with a valid serialized chat message id.The
window.Store.Msg.getMessagesById
function was taken from here: https://github.com/pedroslopez/whatsapp-web.js/blob/066d8fa75ebc13b9cc74cfcd18ffd847b79be998/src/Client.js#L1039Related Issue
closes #3259
Motivation and Context
This will solve the problem of being unable to send messages with a quote attached.
How Has This Been Tested
I've tested this version with my local Node.js install (system/os details can be found in the mentioned issue).
I've tried sending a couple of messages in private and group chats. With both messages from me and others. It has also been tested on a clean install (without auth).
Types of changes
Checklist