-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Add Telegram Bot response message ID #35904
base: next
Are you sure you want to change the base?
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe changes introduce a new feature to the Telegram bot integration, enhancing the functionality of actions that send content. Specifically, actions like Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TelegramBot
User->>TelegramBot: send_message("testing")
TelegramBot-->>User: response(chats: [{message_id, chat_id}])
User->>TelegramBot: wait(5 seconds)
User->>TelegramBot: delete_message(message_id, chat_id)
TelegramBot-->>User: confirmation(deleted)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (2)source/_integrations/telegram_bot.markdown (2)
The description effectively explains:
The automation example is well-structured and demonstrates:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
source/_integrations/telegram_bot.markdown (1)
610-634
: Consider standardizing the delay format for better readability.While the automation example is functionally correct and well-structured, the delay section could be simplified for better readability.
Consider this format instead:
- delay: - hours: 0 - minutes: 0 - seconds: 5 - milliseconds: 0 + seconds: 5The current format with explicit zero values for hours, minutes, and milliseconds adds unnecessary verbosity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
source/_integrations/telegram_bot.markdown
(2 hunks)
🔇 Additional comments (1)
source/_integrations/telegram_bot.markdown (1)
22-23
: LGTM! Clear documentation of the new response data feature.
The documentation clearly explains that send actions now return message and chat IDs, and properly references how to use this data in automations.
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
source/_integrations/telegram_bot.markdown (1)
22-23
: Fix typo in feature descriptionThere's a typo in the word "delievered" - it should be "delivered".
-Actions that send contents (`send_*`) will return a list of `message_id`/`chat_id` for messages delievered (in a property called `chats`). +Actions that send contents (`send_*`) will return a list of `message_id`/`chat_id` for messages delivered (in a property called `chats`).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
source/_integrations/telegram_bot.markdown
(2 hunks)
🔇 Additional comments (1)
source/_integrations/telegram_bot.markdown (1)
615-631
: LGTM! Well-structured example demonstrating the new feature
The example automation effectively demonstrates:
- Using response_variable to capture message details
- Proper iteration over response.chats
- Correct usage of message_id and chat_id for message deletion
Proposed change
This feature documents the new returned data (on
response_variable
) from Telegram Bot integration. Using this new feature when sending content via Telegram allows to perform following actions such as editing or deleting the message, as shown in the new example.Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit
message_id
andchat_id
for delivered messages, enabling better management of sent messages.