Skip to content

[Feat] Add dedicated Telegram bots for existing Sessions - #2336

Open
roomote-roomote[bot] wants to merge 1 commit into
developfrom
feature/telegram-session-bots-18dodbnwky7am
Open

[Feat] Add dedicated Telegram bots for existing Sessions#2336
roomote-roomote[bot] wants to merge 1 commit into
developfrom
feature/telegram-session-bots-18dodbnwky7am

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

Related issue

No linked issue. Requested continuation of an existing Roomote implementation.

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

Existing private Telegram Sessions can have a dedicated bot without manually copying credentials or creating a second conversation. This recovers the completed implementation and delivers it against current Roomote develop, not Roomote Cloud.

What changed

  • Add /sessionbot with Telegram's native Yes, create bot button, explicit bot/Session confirmation, automatic managed-token retrieval and authenticated webhook setup.
  • Bind the existing Session through an expiring one-use activation link, with owner-only private-chat authorization and encrypted credentials.
  • Route dedicated-bot messages, supported attachments, replies and background task updates through the bound bot. /disconnect stops delivery without deleting Session history or falling back to main-bot credentials.
  • Add an additive database migration, regression tests and public setup/limitations documentation.

Initial scope is existing private Telegram Fast Sessions. Groups, arbitrary web Session selection, reconnect, child inline actions/reactions and automatic token/ownership-change recovery are not included. Disconnect does not restore main-bot routing.

How it was tested

  • 366 focused tests passed on current source: API 93, communication 45, PostgreSQL lifecycle 16 and SDK 212.
  • pnpm lint, pnpm knip, docs build/link validation and local development migration application passed; test schema applied successfully.
  • Commit and push hooks passed, including all 27 package check-types:fast tasks.
  • Standard serial check-types timed out, then its retry was interrupted after 24/27 successful packages. Full pnpm check was not rerun; prior full-suite execution encountered failures in unchanged cloud-agent process tests. These are not claimed green.
  • No visual artifacts: proof handoff was blocked with proof capture timed out. No live Telegram creation or end-to-end testing has occurred.

Before enabling users, enable Bot Management Mode on the deployment's main bot, refresh its webhook subscription to include managed_bot, and run a non-production native creation/confirmation/activation smoke test including unauthorized users, attachments, background replies and disconnect. No production configuration or deployment was changed in this work.

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

@roomote-community

roomote-community Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

Reviewed ee65eaf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant