-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix: Tratar conversas @lid no inicio do recebimento dos eventos e novo erro da libsignal #1705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis PR centralizes handling of '@lid' identifiers by rewriting remoteJid to senderPn in Baileys event handlers (while preserving the original in previousRemoteJid), extends the decryption-error filter, tightens TypeScript types in messaging events, adjusts contact logic in ChatwootService using the new previousRemoteJid, updates Jimp image‐processing calls, and bumps several dependencies. Sequence diagram for handling @lid in Baileys message eventssequenceDiagram
participant BaileysService as BaileysStartupService
participant ChatwootService
participant Database
BaileysService->>BaileysService: Receive message event (messages.upsert)
alt remoteJid contains '@lid' and senderPn exists
BaileysService->>BaileysService: Set previousRemoteJid = remoteJid
BaileysService->>BaileysService: Set remoteJid = senderPn
end
BaileysService->>ChatwootService: Pass message with updated remoteJid and previousRemoteJid
ChatwootService->>ChatwootService: Use previousRemoteJid to check for @lid
ChatwootService->>Database: Update or create contact/conversation using senderPn
Database-->>ChatwootService: Confirmation
ChatwootService-->>BaileysService: Conversation/contact created/updated
Class diagram for updated message key handlingclassDiagram
class WAMessageKey {
+string remoteJid
+string senderPn
+string previousRemoteJid
}
class WAMessage {
+WAMessageKey key
+number messageTimestamp
+string[] messageStubParameters
}
WAMessage --> WAMessageKey
Class diagram for ChatwootService createConversation logicclassDiagram
class ChatwootService {
+createConversation(instance, body)
+findContact(instance, id)
+createContact(instance, chatId, isGroup, nameContact, pictureUrl, remoteJid)
}
class InstanceDto
class Body {
+WAMessageKey key
}
ChatwootService --> InstanceDto
ChatwootService --> Body
Body --> WAMessageKey
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Perfeito! |
Mudanças
Summary by Sourcery
Handle @lid-specific remoteJid swapping across Baileys event handlers and Chatwoot integration, ignore a new libsignal error, update image processing to the Jimp v1 API, and bump Jimp and Sharp dependencies.
Bug Fixes:
Enhancements:
Chores: