fix: update package.json to allow puppeteer scripts and add handling … - #201891
Open
nurdiansyahagung10 wants to merge 1 commit into
Open
fix: update package.json to allow puppeteer scripts and add handling …#201891nurdiansyahagung10 wants to merge 1 commit into
nurdiansyahagung10 wants to merge 1 commit into
Conversation
…serialize for whatsapp lid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Serialize message key for WhatsApp LID
Description
Update message serialization logic to properly handle WhatsApp identifiers that may be returned as LID instead of the previously used
@g.usor serialized message ID format.Previously,
chat.lastReceivedKey._serializedwas used directly when retrieving the last message fromWAWebCollections.Msg. This can fail when WhatsApp returnslastReceivedKeyin a different format, such as a string or LID-based identifier.This change normalizes
chat.lastReceivedKeybefore attempting to retrieve the message by:lastReceivedKeyis already a string._serializedwhen available.toString()when necessary.Msg.get()andgetMessagesById().This allows the message serialization flow to handle both the existing WhatsApp ID format and the newer LID format more reliably.
Related Issue(s)
Fix message retrieval when WhatsApp returns LID-based identifiers instead of the expected serialized ID format.
Testing Summary
Test Details
Tested message retrieval with different
chat.lastReceivedKeyformats, including:Verified that
model.lastMessageis correctly populated when the corresponding message exists in the message store.Environment
Type of Change
Checklist
npm test).index.d.ts) have been updated if necessary.example.js) / documentation have been updated if applicable.