Revert "Ignore events that are not messages (like EPHEMERAL_SYNC_RESPONSE)"#1919
Merged
DavidsonGomes merged 1 commit intodevelopfrom Sep 8, 2025
Merged
Revert "Ignore events that are not messages (like EPHEMERAL_SYNC_RESPONSE)"#1919DavidsonGomes merged 1 commit intodevelopfrom
DavidsonGomes merged 1 commit intodevelopfrom
Conversation
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR reverts the previous addition of early-exit guards for non-message events and missing body keys in ChatwootService by deleting those conditional blocks and restoring the message edit flow to use optional chaining for key IDs. Class diagram for reverted guards in ChatwootService methodsclassDiagram
class ChatwootService {
+createConversation(instance: InstanceDto, body: any)
+eventWhatsapp(event: string, instance: InstanceDto, body: any)
+getMessageByKeyId(instance, keyId)
}
ChatwootService : createConversation(instance, body)
ChatwootService : eventWhatsapp(event, instance, body)
ChatwootService : getMessageByKeyId(instance, keyId)
%% The following attributes and guards were removed:
%% - Early exit if body.key is missing in createConversation
%% - Early exit if body.type is not 'message' or 'conversation' in eventWhatsapp
%% - Early exit if body.key is missing in eventWhatsapp (messages.upsert/send.message)
%% - Early exit if body.type is not 'message' and if body.key.id is missing in eventWhatsapp (messages.edit/send.message.update)
%% The method getMessageByKeyId is now called with optional chaining for key.id
File-Level Changes
Possibly linked issues
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.
Reverts #1732
Summary by Sourcery
Revert previous changes that filtered and guarded against missing or non-message events, restoring full event handling and adjusting key.id access to use optional chaining.
Bug Fixes:
Enhancements: