Repository navigation
Fill an empty Telegram connector from a token pasted in support chat - #1585
Merged
Merged
Conversation
Users who add Telegram from the app picker get a connector without a token. When they later paste the token in the support chat, the bot refused because a Telegram connector already existed. Now, when every Telegram connector of the workspace is still empty, the oldest one gets the verified token in place, so links already sent stay valid. A connector that holds a token is still never touched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Follow-up to #1583. The first real case on Cloud (2026-11-08) was refused with "already has a Telegram connector": the workspace had a Telegram connector installed from the app picker without a token. Several other trial users are in the same state.
Now, when every Telegram connector of the workspace is still empty (address still
https://api.telegram.org/bot{{TELEGRAM_BOT_TOKEN}}and no value forTELEGRAM_BOT_TOKEN), the oldest one gets the token in place instead of a new install:getMecheck and daily limit.ConnectorsService.update(variables sealed at rest), thenreloadConnectorToolsand attach to the default server (no-op if attached).filledEmptyConnector: true; the same emails go to the user and the admins.The connector id stays the same, so
?connector=<id>links already sent in chats keep working.Cloud and self-hosted
Cloud only, as before: SupportModule loads only with the support desk configured; self-hosted never loads it.
Tests
Working directory
packages/backend:npx jest src/ee/support --maxWorkers=4→ 5 suites, 64 tests passed (new: fills the oldest empty connector, keeps other variables, leaves a connector that got a token meanwhile, a resolved address counts as set up, refused token fills nothing).npx tsc --noEmit -p tsconfig.json→ no errors.npx eslinton the changed files → clean.