New "change_battery" event is triggered when the battery percentage changes. Has current battery percentage and charging state as object param.
Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
* move this.pupBrowser variable to line 51 to resolve not being able to close the browser when it is not connected to the internet
* move pupPage along with pupBrowser
Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
Messages created by the current client don't have attatched media on message_create because it is still being uploaded and sent. This event allows you to detect when the media has been properly sent so it can be downloaded.
close#111
After this commit, chats will be automatically marked as seen when a message is sent to it. If this is not the intended behavior, `sendSeen: false` can be set as part of the options object.
You can also manually mark a conversation as seen by calling the sendSeen() function on the Chat.
Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
This allows you to listen for user joins or leaves, description updates, subject updates, picture updates, and group settings updates.
Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
This will automatically fetch messages until it reaches the specified limit or there are no more messages. In the future, this should be extended to fetch messages before, after or around a specific message/date by adding props to the searchOptions object.
close#51
Implements ack change detection, making it possible to know when messages have been delivered, read, etc.
Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
* feat : Check if the given number is a whatsapp number
- Avoids sending message to non whatsapp number
- Gets the id of the user from whatsapp server rather than generating on client
Note: This only partly works, since the state may not be updated on WhatsApp's end. In the case of not being able to reach the phone, the state is only updated when the user performs an action, such as sending a message. This means that the state may be CONNECTED when we check, but the phone's really not connected.
ref #43
This makes the client more reliable since it doesn't quit as soon as it looses conection from the phone for a second. Messages should be queued by WhatsApp Web.