-
Notifications
You must be signed in to change notification settings - Fork 119
Feature/request reply buttons #495
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
WalkthroughTwo new keyboard widget classes, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Bot
participant ReplyKeyboard
Bot->>ReplyKeyboard: Build keyboard with RequestContact, RequestLocation, RequestChat, RequestUsers
User->>Bot: Clicks "Send chat" or "Send user"
Bot->>User: Receives chat/user info via Telegram API
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🔇 Additional comments (8)
✨ Finishing Touches
🧪 Generate unit tests
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 (
|
|
Duplicate of #412 |
| def __init__( | ||
| self, | ||
| text: Text, | ||
| request_id: int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not generate request id?
I'd expect that request for old dialog is not processed by new on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently messages from all request widgets may be handled only with a separate MessageHandler in the same window, as it has no on_click or anything, so this concern is probably irrelevant. In the current setting user-provided request ids is more convenient than generated ones. I consider this as an analogue of widget_id that some other widgets have and which is mandatory.
Also, request_id must be unique only within a message, so hard-coded values like 1, 2 etc should not cause any troubles.
Add widgets
RequestUsersandRequestChatfor missing telegram reply keyboard features.https://core.telegram.org/bots/api#keyboardbutton
Summary by CodeRabbit
New Features
Improvements