chrishubert / whatsapp-api

This project is a REST API wrapper for the whatsapp-web.js library, providing an easy-to-use interface to interact with the WhatsApp Web platform.
https://www.christophehubert.com
Other
585 stars 286 forks source link

[Request] Set Label for Whatsapp Business #152

Open masbudikusuma opened 5 months ago

masbudikusuma commented 5 months ago

I've found the getLabel feature, but I haven't found the setLabel feature. Maybe it can be added in the next feature update.

Thank You

chrishubert commented 5 months ago

It will come in the next release: https://github.com/chrishubert/whatsapp-api/commit/2f034a841d9d5dc05559eb0622f17383cf5b28ea

MarksEliel commented 5 months ago

@chrishubert I'm following your GIT, the work is very good, I just saw that the Add and Remove Label to Chat function is already done. Please don't forget to set the option so that when a tag is added, it sends this information via webhook.

chrishubert commented 4 months ago

@MarksEliel, this is not a standard event from the original library : https://github.com/pedroslopez/whatsapp-web.js/blob/ef2f725bce1bd1afd8491f9de0cd2ed06a6febc3/src/util/Constants.js#L40 So it will not be sent to the webhook

MarksEliel commented 4 months ago

I believe it would be very important to have events that listen to labels, when to add a new label, when to remove it, when to assign it to a conversation...

chrishubert commented 4 months ago

@MarksEliel indeed it would be a good feature, do keep in mind it would need to be triggered in WhatsappWeb, which I believe is not available. I would advise you to look into the original repository, https://github.com/pedroslopez/whatsapp-web.js, see if it would be possible to implement.

MarksEliel commented 4 months ago

Got it, same case as Baileys and WppConnect Server

chrishubert commented 4 months ago

@masbudikusuma Can you please try it in the new release?