feat: add group/channel support for Telegram bot
- Add TELEGRAM_GROUP_IDS configuration setting to enable optional group/channel filtering - Add _is_group_enabled() authorization check to all command handlers - Add group/channel authorization check to message_handler - All handlers now verify both user authorization and group authorization - If TELEGRAM_GROUP_IDS is not configured, bot accepts messages from any group - If TELEGRAM_GROUP_IDS is configured, bot only processes messages from those groups This enables the bot to be used in group chats and channels with Topics/Threads support.
This commit is contained in:
@@ -11,6 +11,7 @@ class Settings(BaseSettings):
|
||||
# Telegram
|
||||
telegram_bot_token: str = ""
|
||||
telegram_allowed_user_ids: list[int] = []
|
||||
telegram_group_ids: list[int] = []
|
||||
|
||||
# LLM (OpenAI-compatible)
|
||||
openai_api_key: str = ""
|
||||
|
||||
Reference in New Issue
Block a user