Repository navigation
fix(settings): Telegram token save no longer shows "Save failed: 10" - #149
Open
Hiddify-Official wants to merge 1 commit into
Open
Hiddify-Official wants to merge 1 commit into
Hiddify-Official wants to merge 1 commit into
Conversation
…d: 10"
The "bot connected" toast read "…: @{username}". In vue-i18n "@" starts a
linked message, so compiling it threw CompileError 10 ("Invalid linked
format") right after the settings had been saved and the bot connected:
the save's catch then showed "Save failed" with "10". The "@" is the
literal {'@'} now, in every language (the only such message left in the
admin UI).
When the bot really does not connect, a card above the settings says why
in plain words with numbered steps (token not accepted, the server cannot
reach Telegram, Telegram cannot use this panel's address, other), with
Telegram's message under Technical details; the toast points to it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dxnnystyles
reviewed
Oct 30, 2026
dxnnystyles
left a comment
There was a problem hiding this comment.
could we add a small table-driven test for
telegramErrorKind? the network-first check keeps a
wrapped Invalid token: … timeout from telling admins
to replace a valid token during an outage. the contributing
guide asks for tests + 100% coverage, but i don't see
classifier coverage in this diff.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Many admins report that saving a Telegram bot token in Settings shows Saved successfully followed by Save failed with just "10".
Root cause: the "bot connected" toast was
Telegram bot connected: @{username}, and in vue-i18n@starts a linked message. Compiling it threw CompileError 10 ("Invalid linked format") right after the settings had been saved and the bot connected, so the save'scatchshowed the generic "Save failed: 10". The token was in fact saved, and the bot worked.Change
settings.telegramConnectedin all 7 languages:@is the literal{'@'}. EveryadminV2string was compile-checked with@intlify/message-compiler; no other used message has this problem.features/settings/telegram-error.ts+SettingsView.vue: when the bot really does not connect, a card above the settings explains why in plain words, with numbered steps:register_botreports these as "Invalid token: …" too, so they are matched first.Telegram's message is under Technical details, and the error toast points to the card. New
settings.tgError.*strings in 7 languages.Screenshots
The save was answered by the test browser itself, so main's real token was never changed. The token typed in is a dummy.
The server cannot reach Telegram (Persian):
Tested
baseCompileon the old message gives error 10, and on the new one no error.vue-tsc: no errors in the changed files.Review
🤖 Generated with Claude Code