Skip to content

feat(server): Add messageThreadId handling in super groups for Telegram notifications#5409

Merged
SteKoe merged 6 commits into
codecentric:masterfrom
AliArtukov:patch-1
Jun 19, 2026
Merged

feat(server): Add messageThreadId handling in super groups for Telegram notifications#5409
SteKoe merged 6 commits into
codecentric:masterfrom
AliArtukov:patch-1

Conversation

@AliArtukov

Copy link
Copy Markdown
Contributor

No description provided.

@AliArtukov AliArtukov requested a review from a team as a code owner June 2, 2026 11:43
@AliArtukov

Copy link
Copy Markdown
Contributor Author

Hi guys.
This PR adds support for sending Telegram notifications to specific topics in Telegram supergroups by introducing a new configuration attribute: messageThreadId.

Changes

  • Added new attribute: messageThreadId
  • The attribute value is used to populate the message_thread_id parameter for every Telegram message sent
  • Default value is set to 0

Why

Telegram supergroups support topic-based discussions, where messages can be posted into specific topics using the message_thread_id parameter. Without this parameter, notifications cannot be routed to dedicated topics.

Backward Compatibility

  • Default value 0 preserves existing behavior and supports posting to the default General topic in supergroups
  • For regular groups and private chats, including message_thread_id does not break message delivery
  • Existing configurations continue to work without changes

Use Case

This allows users to route notifications into dedicated topics inside Telegram supergroups (for example, separate topics for environments, services, or alert categories and our company is real case).

Add messageThreadId for sending alerts to specific topic of telegram group.
Updated messageThreadId to default to '0' and removed nullable annotations.
@SteKoe SteKoe enabled auto-merge (squash) June 19, 2026 10:36
@SteKoe SteKoe merged commit 343fdfe into codecentric:master Jun 19, 2026
1 check passed
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.

4 participants