fix(chat): display LID conversations - #36
Draft
MatiasMinoni wants to merge 1 commit into
Draft
Conversation
Reviewer's GuideNormalizes nullable/partial chat API responses and reuses that normalization across chat list and single-chat queries, while updating UI contact/group classification to properly include LID conversations. Sequence diagram for chat list retrieval and normalization including LID JIDssequenceDiagram
actor User
participant ChatComponent as Chat
participant useFindChats
participant Api as api
participant Normalizer as normalizeChat
User->>ChatComponent: select contacts or groups
ChatComponent->>useFindChats: useFindChats(instanceName)
useFindChats->>Api: api.post /chat/findChats/{instanceName}
Api-->>useFindChats: FindChatsApiChat[]
useFindChats->>Normalizer: normalizeChat(chat) for each
Normalizer-->>useFindChats: FindChatsResponse[number]
useFindChats-->>ChatComponent: normalized chats
ChatComponent->>ChatComponent: filter with isContactJid / isGroupJid
ChatComponent-->>User: display visible chats (including @lid conversations)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
What changed
remoteJidwhen Evolution API returns a null chatid.Chatused by React.@s.whatsapp.netand@lidJIDs as contacts while keeping@g.usentries in Groups.Root cause
Evolution API 2.4.0-rc2 can return a valid conversation with
remoteJid=<linked-id>@lidandid=nullwhen the persisted chat uses the phone JID but its latest message uses the linked ID. The Manager then hid that conversation for two independent reasons: Contacts only accepted@s.whatsapp.net, and consumers expectedidto always be a string.This matches the incoming-message symptom tracked in evolution-foundation/evolution-api#2582 and the broader LID tracking issue evolution-foundation/evolution-api#1872.
Impact
Incoming LID conversations remain visible and selectable in the Manager, and their message history can be opened normally. Groups, broadcasts, and newsletters are not reclassified as contacts.
Validation
npm run type-checknpm run lint:check(0 errors; 3 existing Fast Refresh warnings)npm run buildid: nullandremoteJid: 150508622860457@lid: the Manager displayed 1 conversation and rendered its incomingHimessage.Summary by Sourcery
Normalize chat API responses and JID classification so LID-based conversations are consistently visible and categorized in the chat manager.
New Features:
Bug Fixes:
Enhancements: