fix: ajuste na validacao dos bots e pausar sessao#1599
Merged
DavidsonGomes merged 1 commit intoEvolutionAPI:developfrom Jun 17, 2025
Merged
fix: ajuste na validacao dos bots e pausar sessao#1599DavidsonGomes merged 1 commit intoEvolutionAPI:developfrom
DavidsonGomes merged 1 commit intoEvolutionAPI:developfrom
Conversation
Contributor
Reviewer's GuideThis PR enhances bot trigger validation to treat 'none' triggers as wildcards, adds logic to skip processing of paused sessions, and standardizes the findBot return type in controllers. Sequence Diagram: Paused Session Message Handling in BaseChatbotControllersequenceDiagram
actor User
participant BCC as BaseChatbotController
User->>BCC: Sends message (remoteJid, content)
BCC->>BCC: Retrieve session for remoteJid
alt session exists AND session.status == "paused"
BCC->>BCC: Log warning "Session for ${remoteJid} is paused"
Note right of BCC: Skip message processing
else session not paused or does not exist
BCC->>BCC: Continue message processing (existing logic)
%% Potentially interact with ChatbotController / findBotByTrigger etc.
end
Sequence Diagram: Updated Bot Search Logic in
|
| Change | Details | Files |
|---|---|---|
| Enhanced trigger matching in findBotByTrigger to include 'none' as wildcard |
|
src/utils/findBotByTrigger.ts |
| Add session pause handling to skip message processing |
|
src/api/integrations/chatbot/base-chatbot.controller.ts |
| Standardize findBot return behavior in ChatbotController |
|
src/api/integrations/chatbot/chatbot.controller.ts |
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with@sourcery-ai issueto create an issue from it. - Generate a pull request title: Write
@sourcery-aianywhere in the pull
request title to generate a title at any time. You can also comment
@sourcery-ai titleon the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment@sourcery-ai summaryon the pull request to
(re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guideon the pull
request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore. - Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment
@sourcery-ai reviewto trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request
summary, the reviewer's guide, and others. - Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
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.
Summary by Sourcery
Refine bot matching to include both 'all' and 'none' triggers, add an early exit for paused sessions, and standardize return behavior in chatbot controllers.
New Features:
Bug Fixes:
Enhancements: