Closed PP-Contrib closed 2 months ago
The changes involve updates to the WHATSAPP_VERSION
constant in the src/defaults.ts
file, allowing it to default to a version specified in the DEFAULT_CONNECTION_CONFIG
from the @whiskeysockets/baileys
package if the environment variable is not set. Additionally, the log message in the connect
function of src/services/socket.ts
has been modified to clarify the distinction between the WhatsApp version of the connected device and the latest version of the Baileys library.
Files | Change Summary |
---|---|
src/defaults.ts |
Updated WHATSAPP_VERSION to use DEFAULT_CONNECTION_CONFIG.version for default value instead of hardcoded array. |
src/services/socket.ts |
Modified log message in connect function to specify connection using predefined WHATSAPP_VERSION and latest Baileys version. |
🐇 In the code where changes flow,
A version's tale begins to grow.
With logs that shine and constants bright,
Our rabbit hops with pure delight!
Configurable paths, a clearer way,
Let’s celebrate this brand new day! 🌟
src/defaults.ts (1)
`111-111`: **LGTM!** The change to default `WHATSAPP_VERSION` to the version specified in `DEFAULT_CONNECTION_CONFIG` is a good improvement. It enhances configurability, maintainability, and adaptability of the code by removing the hardcoded default value and aligning the default WAWeb version with the default baileys version, as intended in the PR objectives. The change looks safe and I don't see any issues or potential side effects.src/services/socket.ts (1)
`159-159`: **LGTM!** The updated log message provides clearer information by distinguishing between the WhatsApp version used for the connection and the latest Baileys version. This change enhances the logging for debugging and monitoring purposes, aligning with the PR objective of improving the accuracy of the logs concerning the WAWeb version.
Fix Log for WAWeb version and Change and Default WAWeb version to default baileys version
Summary by CodeRabbit
New Features
Bug Fixes