Repository navigation
v6.0.0
Telegram Support Bot v6.0.0
A major release: the open feature requests behind config options, every command working on every addon, optional ticket reference codes, three security fixes, and a full dependency and runtime upgrade (Node 26, Mongoose 9, TypeScript 7, ESLint 10). Docker images: bostrot/telegram-support-bot:v6.0.0 / :latest (amd64, arm64).
⚠️ This release has breaking changes for operators. Read Upgrading from 5.0.0 before you update: Node 26+, MongoDB 4.4+,MONGO_URIprecedence, and no more 32-bit ARM image.
✨ Highlights
- Open feature requests implemented, each behind an option that keeps the previous behaviour by default (#190)
- Feature parity across addons: commands, arguments, canned responses and custom user commands now work on Telegram, Signal, Slack and Discord alike (#204)
- Ticket reference codes: an optional checked code like
TR-016J-Dthat users can quote on another channel; staff look it up with/ref(#219, closes #211) - Security fixes in the Signal addon, the web chat widget and inline buttons (#217, #218)
- Runtime and dependency upgrade: Node 26, Mongoose 9, TypeScript 7, ESLint 10 flat config, current GitHub Actions;
npm auditis clean (#216)
🆕 New features
| Feature | Config / command | Default |
|---|---|---|
| Confine the bot to one forum topic of the staff group (#183) | staffchat_thread_id |
null (whole group) |
| A new ticket for every incoming message; earlier tickets stay replyable (#172) | ticket_per_message |
false |
/broadcast <text> to every known user (#159) |
allow_broadcast |
false |
| Edited user messages re-posted to staff, marked as edited (#147) | forward_edited_messages |
true (see upgrade notes) |
Reply-keyboard buttons on /start (Telegram, without categories) (#142) |
start_keyboard |
[] |
/open marks tickets that already got a staff reply (#137) |
show_replied_mark, language.replied |
false |
Users close their own ticket with /close (#112) |
allow_user_close |
false |
| Sticker forwarding in both directions (#107) | forward_stickers |
false |
/ticket <id> (or as a reply): status, user, category, priority, tags, assignee, timestamps, triage summary, notes and the last 5 messages (#85) |
— | — |
Custom user commands with static answers, listed in /help (#84) |
user_commands |
[] |
| Mirror staff replies from a subcategory group into the parent group (#79) | forward_replies_to_parent |
false |
Checked ticket reference codes and the staff-only /ref <code> lookup (#211). Typos are rejected. The code is informational only: it never links users or grants access |
ticket_ref_codes, language.ticketRef |
false |
- Addon parity (#204): Signal, Slack and Discord pass command arguments like grammY does (
ctx.match), so/ticket,/broadcast,/assign,/tag,/note,/priorityand/reftake arguments everywhere. Unknown slash commands reach custom user commands and canned responses, and only the first matching trigger runs. A few options depend on Telegram-only features and are ignored elsewhere:staffchat_thread_id,start_keyboard,forward_stickers,forward_edited_messages. - New language keys with English defaults:
replied,ticketDetails,editedMessage,broadcastSent,closedByUser,ticketRef - Permission and answer log lines include
@usernameand ids (#123)
🔒 Security fixes
- GHSA-wq8w-p5p2-r74c: Signal staff rights (#217). An admin of any Signal group the bot belonged to was treated as staff. Staff rights are now only granted to admins of the configured staff chat or a category group.
- Web chat widget XSS (#217): messages in the embeddable widget are rendered as text, not HTML.
- Inline unassign button (#217): now requires the same
assignpermission as the assign button and/unassign. - Addon input hardening (#218):
- Discord only accepts numeric guild IDs in API paths and bounds the gateway heartbeat interval; a reconnect no longer stacks heartbeat timers.
- Signal resolves groups from the account's group list instead of putting message-supplied IDs into request URLs.
All Signal deployments should update.
🐛 Fixes
ticket_per_messagekeeps earlier tickets instead of replacing them, so staff replies to older tickets still resolve (#190)- Canned responses (
/<key>) no longer crash withctx.match.substring is not a function(#190) /broadcastsends plain text, so unbalanced Markdown can't fail delivery to individual users (#190)- Staff thread confinement compares thread ids as strings (YAML number vs string) (#204)
- The
MONGO_URIenvironment variable is respected (@Yashko, #199). See the breaking change below.
📦 Dependencies & runtime
- Node.js 26 (
enginesand the Docker base imagenode:26-alpine) - Mongoose 8 → 9 (MongoDB driver 7), grammY 1.46, openai 7.60, express 5.3, socket.io 4.8.4, ws 8.23 and more (#203, #216)
- TypeScript 7 (
@typescript/native) for builds;typescriptis aliased to TS 6 for typescript-eslint and ts-jest npm run devusestsx watchinstead ofts-node-dev. The unusedllamaindexdependency was removed- ESLint 10 with a flat config (
eslint.config.jsreplaces.eslintrc.yml);npx eslint src/works again - GitHub Actions updated to current majors (checkout v7, CodeQL v4, Docker actions, labeler v7); the archived issue labeler was replaced
npm audit: 0 vulnerabilities. Dependabot PRs #191–#198 merged, #205–#215 superseded by #216- Test suite grew from 71 to 205 tests (24 suites)
⬆️ Upgrading from 5.0.0
Breaking changes
- Node.js 26 or newer is required for npm/native installs (
engines: >=26.0.0). Docker users are unaffected: the image ships Node 26. - MongoDB server 4.4 or newer is required. Mongoose 9 uses MongoDB driver 7, which no longer supports 4.0/4.2. The bundled
docker-compose.ymlalready runs MongoDB 8.0. Your data needs no migration. MONGO_URInow overridesmongodb_urifromconfig.yaml.docker-compose.ymlsetsMONGO_URI=mongodb://mongodb:27017/supportfor the bot. If you use an external database configured throughmongodb_uri, the bot silently switches to the bundled MongoDB unless you change the compose file. Fix: indocker-compose.yml, undersupportbot→environment, replace the value with your connection string:Alternatively, delete theenvironment: - MONGO_URI=mongodb://user:password@your-db-host:27017/support
MONGO_URIline somongodb_urifromconfig.yamlis used. Native installs that don't setMONGO_URIare unaffected.- No 32-bit ARM (
linux/arm/v7) image any more. Node 26 has no 32-bit ARM builds, so images are published forlinux/amd64andlinux/arm64only (#221). On a 32-bit OS (e.g. older Raspberry Pi OS), pinbostrot/telegram-support-bot:v5.0.0or move to a 64-bit OS (arm64).
Behaviour change
forward_edited_messagesdefaults totrue: when a user edits a message, it is re-posted to the staff chat marked as edited and stored in the history. Before, edits were forwarded like new messages. Setforward_edited_messages: falseto get the old behaviour.
Steps
Docker
git pull # get the new docker-compose.yml / Dockerfile
# external DB? set MONGO_URI in docker-compose.yml first (breaking change 3)
docker compose build --pull supportbot # or: docker pull bostrot/telegram-support-bot:v6.0.0
docker compose up -dnpm / native
node --version # must be v26 or newer
git pull
npm ci
npm run build
npm run prodNew optional config keys (all optional; copy what you need from config/config-sample.yaml):
staffchat_thread_id: null
ticket_per_message: false
show_replied_mark: false
forward_edited_messages: true
forward_stickers: false
forward_replies_to_parent: false
allow_user_close: false
allow_broadcast: false
ticket_ref_codes: false
start_keyboard: []
user_commands: []Missing language strings fall back to built-in defaults, so existing configs keep working. Nothing else has to change.
Pull requests
#190 Implement open feature requests behind config options · #199 Respect MONGO_URI environment variable · #203 Upgrade dependencies to latest compatible versions · #204 Make the new commands and options work on every addon · #216 Upgrade dependencies and GitHub Actions, migrate ESLint to flat config · #217 Fix Signal staff-rights escalation, web widget XSS and unchecked inline unassign · #218 Harden Discord and Signal addons against crafted IDs and gateway values · #219 Add optional checked ticket reference codes and staff-only /ref lookup · #220 Release v6.0.0 · #221 Drop linux/arm/v7 from the Docker publish platforms · Dependabot: #191–#198
Contributors
@bostrot, @Yashko (first contribution, #199), and @dependabot
Full Changelog: v5.0.0...v6.0.0