Allow telegram bot only in whitelisted chats - #5262
Conversation
📝 WalkthroughWalkthroughThe Telegram Q&A bot now reads ChangesTelegram Q&A chat whitelist
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
lib/sanbase/telegram_bot/message_handler.ex (1)
34-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove in-code comments to comply with coding guidelines.
As per coding guidelines, you must "Avoid adding comments to code". The information in these comments is either self-evident from the implementation or already comprehensively covered in the module's
@moduledoc. Please remove them to maintain compliance with the project's standards.
lib/sanbase/telegram_bot/message_handler.ex#L34-L38: Remove the comments preceding@default_allowed_chats.lib/sanbase/telegram_bot/message_handler.ex#L95-L95: Remove the inline comment about replying to a bot answer.lib/sanbase/telegram_bot/message_handler.ex#L104-L107: Remove the comments preceding thechat_allowed?/1function.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@lib/sanbase/telegram_bot/message_handler.ex` around lines 34 - 38, Remove the comments at lib/sanbase/telegram_bot/message_handler.ex lines 34-38, 95, and 104-107, including the comments before `@default_allowed_chats`, the inline bot-answer reply comment, and the comments before chat_allowed?/1; leave the associated implementation unchanged.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@lib/sanbase/telegram_bot/message_handler.ex`:
- Around line 34-38: Remove the comments at
lib/sanbase/telegram_bot/message_handler.ex lines 34-38, 95, and 104-107,
including the comments before `@default_allowed_chats`, the inline bot-answer
reply comment, and the comments before chat_allowed?/1; leave the associated
implementation unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c0c147db-9de0-4b4d-add7-8d2cb55107c9
📒 Files selected for processing (2)
lib/sanbase/telegram_bot/README.mdlib/sanbase/telegram_bot/message_handler.ex
Changes
Ticket
Checklist:
Summary by CodeRabbit
New Features
Documentation