fix(gateway): rename Telegram topic from /title, not only auto-titles - #49245
Merged
kshitijk4poor merged 1 commit intoJun 19, 2026
Merged
Conversation
…tles Auto-generated session titles already rename the Telegram forum topic via the title_callback path, but the /title command only wrote the session title to the database. On a Telegram topic lane the visible topic kept its auto-assigned name, so a user who ran /title to override it saw no change. Propagate the user-chosen title to the topic by calling the existing _schedule_telegram_topic_title_rename helper on a successful /title set. It already no-ops off Telegram topic lanes and when auto-rename is disabled.
kshitijk4poor
enabled auto-merge (rebase)
June 19, 2026 20:23
Collaborator
|
Duplicate of #14462 — this salvage implements the same Salvage of #49172. Related: #21111 (open same-mechanism), #46644 (broader groups+/title scope). The canonical fix to land remains #14462. |
This was referenced Jun 19, 2026
This was referenced Jul 27, 2026
Open
19 tasks
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
/title <name>now renames the visible Telegram forum topic, not just the session title in the database.Salvage of #49172 by @hakanpak, cherry-picked onto current
mainwith authorship preserved.Root cause
Auto-generated session titles already rename the Telegram topic via the auto-title
title_callback→_schedule_telegram_topic_title_rename. But_handle_title_commandonly calledset_session_title, so a user who ran/titleto override the auto-assigned topic name saw the DB title change while the topic name stayed put — no way to rename the topic after Hermes auto-named it.Changes
gateway/slash_commands.py: on a successful/titleset, also call the existing_schedule_telegram_topic_title_rename(source, session_id, sanitized). The helper already no-ops off Telegram topic lanes and whendisable_topic_auto_renameis set, so other platforms and the show-title (no-arg) path are unaffected.tests/gateway/test_title_command.py:/title <name>schedules the topic rename with the sanitized title; the show-title path does not.Validation
/title <name>renames Telegram topic/titleno-arg) triggers renametests/gateway/test_title_command.pyPicks the cleanest of the duplicate cluster (#35678, #46644, #21111, #14462) — reuses the canonical helper rather than reimplementing topic-rename machinery, on current base, with test coverage for both the rename and no-rename-on-show paths.
Closes #49172