Repository navigation
Conversation
Every department of an operator bot gets a Topic icon select in Edit bot departments: one of Telegram's free topic icons (getForumTopicIconStickers, no Premium needed) or the default icon in one of the six colours. Stored in lhc_telegram_bot_dep.topic_icon and passed to the three createForumTopic calls as icon_custom_emoji_id / icon_color. Mobile clients otherwise draw the first letter of the topic name, which is "[" for every chat topic.
mysubcult
force-pushed
the
feat/topic-icons
branch
from
October 26, 2026 08:29
c150fbe to
848ba8d
Compare
lhc_telegram_bot_dep.topic_label: when set, topic names start with "<label> ·" instead of "[Department]" (also on page change), so a coloured default icon shows a meaningful letter instead of "[". Edit bot departments shows a preview of the icon and the topic name for every department.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
What
Next to every department in
Telegram bots > Edit bot departments(operator bots):getForumTopicIconStickers— bots may use only these, no Telegram Premium needed) →icon_custom_emoji_id; or the default icon in one of the six allowed colours →icon_color; nothing → the default icon, as now.Department ·instead of[Department], e.g.Sales · Nick #12 | …, so the first letter is the department's, not[.<label> ·instead, e.g.TG · Nick #12 | …. A coloured default icon shows the first letter of the topic name, so it becomes a blueT.Why: mobile clients draw the first letter of the topic name as its icon, and for chat topics that is always
[([Department] Nick #id …), so every topic looks the same in the topic list.How
lhc_telegram_bot_dep.topic_iconandtopic_label(varchar(50),doc/structure.json/doc/install.sql). The icon value is checked against the icon set and the colour list before saving.providers/TelegramTopicIcons.php:addIcon()wraps the data of the threecreateForumTopiccalls,topicPrefix()builds the start of the topic name in the four places it is built (includingeditForumTopicon page change). The icon set is cached for a day incache/telegram_topic_icons_<bot id>.json; on an API error topics are created without an icon.Without any setting topics get the default icon as now; only the brackets around the department name are gone. #102 (mail topics) uses the same helper when it is present.
🤖 Generated with Claude Code