Replies: 6 comments
-
The requested functions don't exist in WAJS, but I added the label for us to add them in the future. |
Beta Was this translation helpful? Give feedback.
-
Me also trying to develop this feature. let us know if any body develop this |
Beta Was this translation helpful? Give feedback.
-
|
Any update on this issue? |
Beta Was this translation helpful? Give feedback.
-
|
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. |
Beta Was this translation helpful? Give feedback.
-
|
any better option for this ? |
Beta Was this translation helpful? Give feedback.
-
|
I've converted the original issue, to this discussion thread to keep in right place. If you guys don't need any more info here, let's close it. But in my 2 cents here, these faced problems are not related directly to wa-js, it's more how to handle DOM manipuilation. So I would close this thread in future. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I searched documents but not found the selected messages in activechat object.
I also wonder how to select the messages.
Beta Was this translation helpful? Give feedback.
All reactions