dimaskiddo/go-whatsapp-multidevice-rest

Received message handler?

Diden05 opened this issue ยท 10 comments

We need a handler for received messages, calls, message statuses, etc. :)

ibnux commented

I see that he already implemented database using postgree or maybe MySQL
We can get message in there

But yeah it will be good if there a config in .env maybe like url_message_received_callback= if it not empty, then it post message to that url

I see that he already implemented database using postgree or maybe MySQL We can get message in there
But yeah it will be good if there a config in .env maybe like url_message_received_callback= if it not empty, than it post message to that url

Only sqlite so far :)
MySQL would be magical, but whatsmeow doesn't plan mysql support, postgresql is prioritized there
PS: whatsmeow doesn't seem to store messages in the database

@Diden05 for PostgreSQL support you just need add postgresql connector in pkg/whatsapp/drivers.go and change the environment vars for Type and URI

@dimaskiddo I understand, I will do it in the future, you must first transfer the main application from MySQL to PostgreSQL :)
Thanx!

I found the documentation https://pkg.go.dev/go.mau.fi/whatsmeow#Client.AddEventHandler but somehow I have no idea how to do it in our case

Thank's @Diden05 for the information, i also already explore it, with implement it as webhook like pak @ibnux said soon

Can't wait to see this in action... Any estimation on when to implement this pak @dimaskiddo ? ๐Ÿ˜Š ๐Ÿ™

ibnux commented

For now I use android apps, whatsauto In playstore

Because WhatsApp still need dedicated phone that's why it handle received message in phone

waiting for webhook implementation, this is going to be really cool ๐Ÿ™

hey, really need this feature man. Do you have any estimations?