Logger, replies and other bunch of things
What's Changed
- Improving the Github Actions by @Secreto31126 in #18
- Added reply to message and bumped to v14.0 by @Secreto31126 in #19
- Logs by @Secreto31126 in #20
- Improved logSentMessages callback parameters by @Secreto31126 in #21
- Unit-tests by @Secreto31126 in #23
Logger
Easily log every call to sendMessage with the sent object by the bot. Useful for keeping track and debuging conversations between the bot and the client.
new WhatsAppAPI("TOKEN").logSentMessages((from, to) => console.log(`Sent message from phoneID ${from} to user ${to}`));Reply
This option poped-up in the documentation, and even though the implementation from my code should be correct, it doesn't work. I tested it with the simplests commands and nothing. Maybe it's still not available 🤷♂️. Anyway, the code is there for when they decide to enable it.
Whatsapp.sendMessage(from, to, new Text("Hello World!"), "the-message-id-you-want-to-reply-to")Version bump
Now the default version of the API is v14.0 . This is the only breaking change from the previous version.
Git
Minor changes to the repository. Better CI-CD, a new (and faster) documentation website, and last, but not least, there are unit tests for less than half of the code. I will consider increasing the coverage, sooner or later.
Full Changelog: v0.4.2...0.5.0