Repository navigation
feat(telegram): support forum topic thread ID (#565) - #568
Conversation
Add telegram_thread_id option to allow addressing specific forum topics and message threads in Telegram groups. Signed-off-by: TassioSales <tassiolucian.ljs@gmail.com>
|
Caution Review failedThe pull request is closed. No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Configure and format Telegram thread IDs pkg/providers/telegram/telegram.go, pkg/providers/telegram/telegram_test.go, README.md |
Options adds TelegramThreadID. URL construction appends it to the chat ID only when the thread ID is set and the chat ID contains no colon. Tests cover both URL cases, and the README example includes the optional setting. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Feature
Possibly related PRs
- projectdiscovery/notify#506: It defines the existing
telegramURLformat, which this change also modifies and tests.
Suggested reviewers: mzack9999
Merge Risk: 
Moderate · up to 6a798
-
Gotify messages may appear sent without delivery, and redirects can expose delivery tokens. Explicitly configured integration tests can also be skipped. Resolve these paths before merging.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Linked Issues check
-
Explanation
Issue
#565requires an optional thread ID that sends notifications to a configured Telegram topic.Options.TelegramThreadIDmaps totelegram_thread_id. When the value is non-empty andTelegramChatIDhas no colon,telegramURLcreateschatID:threadID, which shoutrrr uses for Telegram topic delivery. The tests cover thread formatting and existing colon preservation. README.md documents the option.
Full details: Out of Scope Changes check
-
Explanation
The changed files support issue
#565.telegram.goadds the configuration field and URL formatting.telegram_test.goadds focused unit tests.README.mddocuments the new option. No unrelated change is shown in the supplied evidence.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
A rabbit taps a topic key,
A thread ID joins the chat,
The URL carries both along,
No colon means it’s added,
Then hops away, content.
Comment @coderabbitai help to get the list of available commands.
Fixes #565
Summary of Changes
Previously, notify could only send messages to the whole Telegram chat or group without a dedicated thread configuration field. In Telegram groups with forum topics enabled, notifications need to be targeted to specific topics.
This PR adds dedicated thread ID support:
telegram_thread_idConfiguration Option: AddedTelegramThreadIDtotelegram.Optionsmapping totelegram_thread_idin YAML.TelegramThreadIDis provided (and not already formatted with a colon),telegramURLformats the channel aschatID:threadID, which shoutrrr automatically extracts and dispatches asmessage_thread_idto the Telegram Bot API.README.mdto documenttelegram_thread_id.pkg/providers/telegram/telegram_test.gocovering:chatID:threadIDwhen thread ID is configured.Signed-off-by: TassioSales tassiolucian.ljs@gmail.com
Summary by CodeRabbit