-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get selected messages in the active chat #1235
Comments
The requested functions don't exist in WAJS, but I added the label for us to add them in the future. |
Me also trying to develop this feature. let us know if any body develop this |
Any update on this issue? |
My current solution is by traversing DOM tree, function getSelectedMessages() {
let selectedIds = Array.from(document.querySelectorAll("[role='row'] [data-id]")).filter(i=>i.querySelector('input:checked')).map(i=>i.dataset["id"])
const selectedMsgs = WPP.whatsapp.MsgStore._models.filter(i=>selectedIds.includes(i.id._serialized))
return selectedMsgs
}
// will return selected Messages object, and empty array if no selected message
console.log(getSelectedMessages()) It would be great to have this function baked into the lib. |
I searched documents but not found the selected messages in activechat object.
I also wonder how to select the messages.
The text was updated successfully, but these errors were encountered: