vasani-arpit / WBOT

A simple Web based BOT for WhatsApp™ in NodeJS 😜. Working as of 📅 Feb 4th, 2024
Other
988 stars 313 forks source link

How can I detect the messages that I send myself? #332

Closed jasp402 closed 2 years ago

jasp402 commented 2 years ago

Describe the solution you would like I would like to know how I can send and receive messages sent from my same number.

In the WAPI.js file, the variable isSentByMe and isMe were found. removed all validations on functions like isChatMessage() and getAllMessageIdsInChat().

But I can't get it to work. Understanding that an indefinite loop can be generated. but I'm sure that can be handled.

any suggestion?

vasani-arpit commented 2 years ago

After Multi-device it is hard to get the messages from WA. You can keep track of what you sent. You can get chat items from client

https://github.com/vasani-arpit/WBOT/blob/master/src/index.js#L113

jasp402 commented 2 years ago

Hi vasani!

I have found that by changing this section I can already receive the messages I send. y It is possible to listen to my own messages if I am in a group. The solution I used was to create a group for myself. It's not what I wanted but it works great for what I need.

image

vasani-arpit commented 2 years ago

Nice. Closing this as it is resolved now.