#Get who voted in a poll
13 messages · Page 1 of 1 (latest)
Implementation is still under progress, more info read this: https://github.com/pedroslopez/whatsapp-web.js/pull/1887
Hello guys I wonder to know if there is any solution about it. The current version is 1.25 and It doesn't have any method for getting votes from old polls.Any suggestion or branch?
Use event vote_update but there is a trick to make it work, after sending a poll open the chat window
const poll = new Poll('Do you prefer?', ['Cat', 'Dog']);
const msgVote = await client.sendMessage('xxxxxxxxxxx@c.us', poll);
const chatWindow = await client.interface.openChatWindow('xxxxxxx@c.us');
Thank you for your kind response @runic crown. What I mean is how to get votes from all Polls created by admins long time ago.
I need to create a report which count all group votes not to create new ones and listen them by vote_update event.
Not sure if i was clear enough. If you hace any guide I really appreciate it.
You can't do it, answers were given and the only way to get the vote is the event vote_uodate
@runic crown you mean, the old poll we can't handle it right? because I try openChatWindow after connection is READY, but on vote_poll not capture any poll.
It only will receive new votes
ok understood. thanks.
@runic crown thank you again for the explanation. That was what I thought. Do you know if that is possible in future features I mean do you think it is something that can be developed. Because I saw some chrome addons can do it. Maybe use the best of both?
Idk
I did this and yeah it's work again correctly.
I just fix openChatWindow method at src/util/InterfaceController.js
https://github.com/pedroslopez/whatsapp-web.js/pull/3293/commits/ecf1c3f6a2d7be8ad2de678832afe023f7c77145
Have fun 👍