Skip to content

feat(telegram): enhance [telegram] trust config with group policy (Phase 1) #1362

Description

@chaodu-agent

Summary

Enhance the existing [telegram] config section (from PR #1297) with group-level trust policy, aligning with the full Phase 1 architecture.

Current State

Target State

[telegram]
allowed_users = ["123456789", "987654321"]
# allow_all_users = true  # explicit opt-in

# Optional: group-level trust (similar to LINE)
# Consider whether Telegram groups need open/members policy

Tasks

  • Wire Telegram trust through PlatformTrustConfigs registry — already done on main: src/main.rs inserts telegram from the resolved [telegram] section (or TELEGRAM_* env), overriding the uniform GATEWAY_* seed
  • Consider group policy for Telegram groups (@mention pattern similar to LINE)
  • Ensure is_bot derivation uses message.from.is_bot (native field)
  • Deny-echo via reply in-chat
  • Deprecate GATEWAY_ALLOW_ALL_USERS / GATEWAY_ALLOWED_USERS for Telegram
  • Verify cron platform support (PR feat(cron): support telegram platform for cronjob #1315 added Telegram cron jobs)

Notes

  • Sender ID: stringified integer (e.g., "123456789") — do NOT use @username
  • [telegram] section already partially implemented and wired into the trust registry — this is enhancement, not greenfield
  • Telegram cron support (feat(cron): support telegram platform for cronjob #1315) means Telegram events come from both gateway AND cron paths

Refs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions