open-wa / wa-automate-nodejs

💬 🤖 The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates!
https://docs.openwa.dev/
Other
3.08k stars 592 forks source link

[Feature Request] Exclude contacts when replying/sending message in group #3027

Open fire17 opened 1 year ago

fire17 commented 1 year ago

Hey yo, This might seem a bit fringe, but I recall seeing in the past some native indications of excludeContacts or something like that I don't remember if it was in your code somewhere around wapi.js or was it from metadata received from whatsapp which i got a catch of. I cant find any referenced to it now sadly, but I hope some of the more veteran ones will remember, maybe you also saw something similar (if you've messed with wa as long as you have) it might have been in the privateReply or something idk

The usecase is pretty powerful, if this is possible, you could single out a contact in a group you want to send a message to, get the list of all the users in the group, remove that number from the list, and set that list as the excludeContacts. Then you can send private messages to users in a group 🤯 This paired with admin-only-sending groups could make for some really clever applications :) Hope someone has lead, Thanks! Have a great week/end

MoonLGH commented 1 year ago

sorry, but isnt this is a simple thing that could be implemented on the user end code and no need to be on the library ?

fire17 commented 1 year ago

Maybe i didnt explain the scenerio clearly enough Theres a group with 10 people I want to send a message/reply in that group, But add an excludeContacts param to the message params that will infact send the message in the group, but the people on the exclude list, will not see these messages.

this is not normal whatsapp behavior, but i recall seeing it somewhere in the library sometime in the past. so if you know how to do this please advise @smashah

smashah commented 1 year ago

I don't know where you got the idea that that's even possible. If you show me screenshots or something I can look into it.

Closest thing I can think of is that you can tag people in messages but hide the tag. That way it looks like they were mentioned in a message but no one else in the group chat can see that they were mentioned. Is that what you mean?

fire17 commented 1 year ago

I said it was fringe... anyway i'd love to share screenshots if i had any. I just remembered seeing an "exclude" somewhere I think it had something to do with reply.. maybe it is what you are talking about with the tags can you show an example on how to do that exclusion ? i want to see what how it looks like what you described, interesting

smashah commented 1 year ago

Just search hideTags here: https://openwa.dev/docs/api/classes/api_Client.Client

This way you can add the tag in the message but then hide it from everyone else so only the tagged people get the @ notification/indicator.