skill: add /add-telegram-threads-autoregistration#136
Open
farooqu wants to merge 3 commits into
Open
Conversation
- Route messages to thread-scoped JIDs (tg:<chatId>:<threadId>) when registered, falling back to base chat JID for unregistered threads - Cache forum topic names from forum_topic_created/edited events so registered threads get meaningful names instead of the parent group title - /chatid in a thread now shows both the thread JID (with topic name if cached) and the base chat JID - /ping, sendMessage, and setTyping are all thread-aware — replies land in the correct topic rather than the General channel - Remove unused parseTelegramJid export - Add comprehensive tests covering routing, topic caching, commands, and thread-aware send/typing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a message arrives in a thread of a registered supergroup, NanoClaw automatically registers the thread as its own isolated group. The thread inherits the parent's trigger, containerConfig, and requiresTrigger. Adds the add-auto-register-telegram-threads skill (SKILL.md) so users can apply this feature on demand. Code changes are limited to the Telegram skill — no core types or DB schema touched. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the opaque `tg<chatId>-<threadId>` folder pattern with `<parentFolder>_<threadSlug>`, where threadSlug is the topic name lowercased and slugified (e.g. `telegram_mygroup_support`). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Adds the
add-telegram-threads-autoregistrationskill, which lets users opt in to automatically registering Telegram forum threads as isolated groups.When applied, any new thread message in a registered supergroup is automatically registered as its own group — inheriting the parent's trigger, container config, and
requiresTriggersetting — so each forum topic gets its own isolated context without manual registration.Depends on
Requires the forum thread support from PR #135. The
TelegramChannelclass must already have thetopicNamesmap andforum_topic_created/forum_topic_editedlisteners before this skill is applied.How it works
This is an instruction-only skill (no code on this branch). When a user runs
/add-telegram-threads-autoregistration, Claude follows the SKILL.md to make the changes:registerGroup?callback toChannelOptsandTelegramChannelOptsregisterGroupfunction fromindex.tsinto channel optsautoRegisterThreadmethod toTelegramChannel🤖 Generated with Claude Code