* feat(signal): add RetryReason enum and MAC error-based session recreation
* feat(signal): add identity change detection with automatic session clearing
* fix(signal): integrate identity change detection with pkmsg decryption
This completes the identity change detection implementation by actually
calling saveIdentity() during pkmsg decryption, which is CRITICAL for
the feature to work.
Changes:
- Add extractIdentityFromPkmsg() function that parses PreKeyWhisperMessage
protobuf to extract sender's identity key (33 bytes)
- Call saveIdentity() BEFORE decryption in decryptMessage() for pkmsg type
- Log when identity change is detected
Flow:
1. Receive pkmsg from sender
2. Extract identity key from PreKeyWhisperMessage protobuf
3. Call storage.saveIdentity() which compares with stored key
4. If key changed → session is cleared atomically
5. Decryption proceeds with re-established session
This matches WhatsApp Web's behavior where extractIdentityKey is called
before handleNewSession (GysEGRAXCvh.js:40917, 48815).
Ref: WhatsApp Web's extractIdentityKey (GysEGRAXCvh.js:48976-48998)
* feat: replace async crypto with sync Rust WASM for app state sync
* fix: remove unecessary buffer copying
* fix: update whatsapp-rust-bridge to version 0.5.2 and refactor async calls to sync. HKDF and MD5 in rust
* fix: improve message resend logic by adding checks for message IDs
* Revert "fix: improve message resend logic by adding checks for message IDs"
This reverts commit c03f9d8e6fc6cbfbb9d1f8f67c169700e704213d.
* feat: add unified session handling and time constants
* refactor: improve socket variable destructuring and presence update logic
* fix: remove unnecessary semicolons in socket and time constants definitions
* fix: handle invalid server time offset parsing in makeSocket function
* fix(proto-extract): regenerate corrupted yarn.lock to restore install process
* chore(proto-extract): update acorn parser to latest version for compatibility with new WhatsApp JS syntax
* Update baileys version to 2.3000.1029027441
* Update version number in Defaults index
* Revert WAProto.proto to resolve merge conflict and restore expected structure
---------
Co-authored-by: Vrypt <vryptt@gmail.com>
Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
* fix: ensure proper socket closure and await connection termination in tests
* feat(tests): enhance E2E tests for image and video message handling, including downloads and group interactions
* feat: add patch-tojson functionality for improved proto serialization
* Remove patch-tojson functionality and its import from the main index file to streamline the codebase.
* refactor: simplify longToString and longToNumber functions for better readability and performance
* fix: improve message resend logic by adding checks for message IDs
* Revert "fix: improve message resend logic by adding checks for message IDs"
This reverts commit c03f9d8e6fc6cbfbb9d1f8f67c169700e704213d.
* feat: add group member label update functionality and event emission
* feat: refactor updateMemberLabel function for improved readability
* feat: use optional chaining for label association message in processMessage
* feat: add updateMemberLabel to makeMessagesSocket for enhanced functionality
* fix: correct log message for group member tag update event
Co-authored-by: FgsiDev