Skip to content

Add Telegram group/supergroup forwarding compatibility and settings guidance#77

Merged
cto-new[bot] merged 1 commit into
mainfrom
cto/implement-telegram-forwarding-groups
May 12, 2026
Merged

Add Telegram group/supergroup forwarding compatibility and settings guidance#77
cto-new[bot] merged 1 commit into
mainfrom
cto/implement-telegram-forwarding-groups

Conversation

@cto-new
Copy link
Copy Markdown

@cto-new cto-new Bot commented May 12, 2026

What changed

Implemented Telegram forwarding updates for both backend and dashboard UX so group/supergroup chat IDs are supported reliably.

Backend (mail-worker/src/service/telegram-service.js)

  • Added chat-id normalization/validation for stored tgChatId comma strings:
    • trims values
    • ignores empty entries
    • accepts only signed integer IDs via regex (^-?\d+$)
    • deduplicates IDs
    • preserves IDs as strings (no numeric conversion)
  • Added per-chat type detection via Telegram getChat.
  • Updated inline button behavior per chat type:
    • private: keeps existing web_app button behavior
    • non-private (group, supergroup, channel, unknown fallback): uses normal url inline button
  • Kept existing message formatting and optional code copy_text button behavior.
  • Improved error logging with richer context (chatId, chat type, status, response body/network failure details).
  • Preserved multi-chat forwarding and ensured one chat failure does not block others.

Frontend (mail-vue/src/views/sys-setting/index.vue)

  • Updated Telegram settings UX copy with clearer guidance for supported target IDs.
  • Added helper text below chat-id input to explain user/group/supergroup support and include negative ID example format.
  • Tightened chat-id tag validation to signed integer regex (^-?\d+$).
  • Preserved comma-splitting and deduplication behavior for pasted values.
  • Sanitized/deduplicated chat IDs both when opening Telegram settings and before save.

i18n

  • Updated and added guidance keys in:
    • mail-vue/src/i18n/en.js
    • mail-vue/src/i18n/zh.js
  • New copy now clearly documents group/supergroup support and example ID format (-100xxxxxxxxxx style).

Notes

  • Attempted browser verification with agent-browser against local Vite dev server. The app remained on its loading screen in this environment, so UI behavior was validated by code-path inspection plus static snapshot evidence rather than full interactive flow.

Powered by CTO.new

@cto-new cto-new Bot merged commit d40a96d into main May 12, 2026
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.

0 participants