feat: relax telegram ACL to chat id (#26)

This commit is contained in:
banteg
2026-01-02 17:59:22 +04:00
committed by GitHub
parent 8a5a5f88ed
commit acc76f770e
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ See `docs/adding-a-runner.md` for the full guide and a worked example.
```
Telegram Update
poll_updates() drains backlog, long-polls, filters chat_id == from_id == cfg.chat_id
poll_updates() drains backlog, long-polls, filters chat_id == cfg.chat_id
run_main_loop() spawns tasks in TaskGroup
+1 -1
View File
@@ -95,7 +95,7 @@ if you prefer no notifications, `--no-final-notify` edits the progress message i
## notes
* private chat only: the bot only responds to the configured `chat_id`
* the bot only responds to the configured `chat_id` (private or group)
* run only one takopi instance per bot token: multiple instances will race telegram's `getUpdates` offsets and cause missed updates
## development
+1 -1
View File
@@ -679,7 +679,7 @@ async def poll_updates(cfg: BridgeConfig) -> AsyncIterator[dict[str, Any]]:
msg = upd["message"]
if "text" not in msg:
continue
if not (msg["chat"]["id"] == msg["from"]["id"] == cfg.chat_id):
if msg["chat"]["id"] != cfg.chat_id:
continue
yield msg