morethanwords/tweb/master • 1ca7cb9 • 30 files, +1200/-73 Show the group's sticker set and emoji pac

Telegram github commits and releases

Telegram github commits and releases

@tgappsupdates

Broadcast from the most important Telegram clients' repositories

4 538 підписників
Відкрити в Telegram
morethanwords/tweb/master1ca7cb930 files, +1200/-73
Show the group's sticker set and emoji pack in the panel, and let admins set them

A supergroup can offer a sticker set and a custom emoji pack to everyone
chatting in it. tweb showed neither and had no way to set either: the packs
existed in channelFull as `stickerset` / `emojiset` and were simply ignored.

Panel side. GroupSetController (emoticonsDropdown/groupSet.ts) resolves what
the open chat offers and hands the stickers / emoji tab a section for it, so
the set shows up even when the user has not installed it. Resolving reads the
chat's full info, so it is kept off the chat-open path: it runs when the
dropdown opens and afterwards only on that chat's `chat_full_update`. The
section is filed under a synthetic category id rather than the set's own —
the same set may also sit in the user's list, and the install / delete /
reorder events address those by id; when the user installs it themselves the
group copy is dropped as a duplicate, and uninstalling brings it back.

Who sees what follows tdesktop: a sticker set is the server's call
(`can_set_stickers`, i.e. the group is big enough), an emoji pack is
`amCreator() || (adminRights & ChangeInfo)` in a megagroup. An admin gets a
gear to the setup screen; everyone else gets tdesktop's Hidden place — the
section collapses below their own sets and the choice persists per chat,
keyed by the set id so a group swapping packs brings it back.

Setup screen. AppGroupStickersTab serves both variants: search by
t.me/addstickers link, short name or @name, the user's own sets with a radio,
apply and remove, and it follows the chat while open (another admin or
session replacing the pack, or the group being boosted under it). The emoji
pack additionally needs a boost level (`group_emoji_stickers_level_min`) —
the entry in Edit Chat stays visible below it with a level badge, and
applying offers boosting instead of failing.

appChatsManager.setGroupStickerSet wraps channels.setStickers /
channels.setEmojiStickers and patches the cached full chat.

openBoosts is now the single entry into boosting — the chat topbar's menu
item and both level gates — sending an admin to the Boosts tab and everyone
else to the boost popup, and no longer stacking a second Boosts tab on a
repeated tap. PopupBoost takes a reason so the copy says which feature the
level is for instead of talking about stories.

Reused rather than copied: Badge gained the rectangle variant that was living
as `.personal-channel-counter` (which now uses it), SearchLoading /
SearchEmpty moved out of chat automation into a shared component, Row.Media
made its size optional.

Two guards for crashes met on the way: selectTarget's indicator lookup runs a
frame later, by which point the row may be rebuilt or the previous item gone,
and the category-visibility observer may hold an entry for a category deleted
since it queued.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

#webk
Відкрити пост в Telegram