-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor #36
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
Conversation
…eaning up configuration.
… handling and response management.
…ndling with Temporal integration.
…SummaryHandler for Telegram event processing with Temporal integration.
…d remove unused Temporal client integration. Add HandlersModule to manage event handling more effectively.
|
Caution Review failedThe pull request is closed. WalkthroughThis update refactors the bot's architecture by introducing handler classes for processing Telegram commands and updates, moving logic out of the main service. New handler modules are registered, and Temporal workflow invocations are delegated to these handlers. The docker-compose file is simplified by removing unused service definitions. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Telegram
participant BotService
participant QuestionHandler
participant UpdateHandler
participant VerifyHandler
participant SummaryHandler
participant Temporal
User->>Telegram: Sends message/command
Telegram->>BotService: Forwards update
alt Question command
BotService->>QuestionHandler: handle(ctx)
QuestionHandler->>Temporal: Start TelegramQuestionWorkflow
Temporal-->>QuestionHandler: Returns result
QuestionHandler->>Telegram: Replies to user
else Update event
BotService->>UpdateHandler: handle(ctx)
UpdateHandler->>Temporal: Start TelegramUpdateWorkflow
else Verify command
BotService->>VerifyHandler: handle(ctx)
VerifyHandler->>Temporal: Start TelegramVerifyWorkflow
Temporal-->>VerifyHandler: Returns result
VerifyHandler->>Telegram: Replies to user
else Summary command
BotService->>SummaryHandler: handle(ctx)
SummaryHandler->>Temporal: Start TelegramSummaryWorkflow
Temporal-->>SummaryHandler: Returns result
SummaryHandler->>Telegram: Replies to user
end
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (9)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit