morethanwords/tweb/master • 6cb2df2 • 1 files, +2/-2
Don't append live messages to the pinned-messages view
The history_append/history_multiappend handlers guarded against the
Scheduled/Static/Logs chat types but not Pinned. The pinned view shares the
chat's messagesStorageKey and, once fully loaded, has loadedAll.bottom === true,
so a regular incoming message fell through every guard and got rendered as a
bubble in the pinned list. Exclude Pinned from both append handlers, matching
the existing pattern; history_delete is left intact so deleted/unpinned messages
still disappear from the view.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
morethanwords/tweb/master • 5d5c3ef • 3 files, +49/-3
Read mention/reaction when jumping to an already-visible message
The unread mention/reaction corner button only scrolled to the target via
setMessageId; the actual read is driven solely by the intersection observer,
which fires only on an intersection CHANGE. When the target is already on
screen — typical for reactions, which sit on our own recent messages — the
programmatic scroll is a no-op, so no callback ever fires: the reaction stays
unread and the badge never clears.
Fix it by re-arming the observer for the focused bubble after it is rendered
and scrolled into view, forcing a fresh intersection entry. It still reads
only if the bubble is actually intersecting, so "read == seen" holds.
- SuperIntersectionObserver.reobserve(target): re-deliver an entry for an
already-observed target (handles bubbles with multiple callbacks, e.g. a
mention that also carries the history observer); no-op while frozen.
- ChatBubbles.reobserveUnreadContent(peerId, mid): guarded re-arm, only acts
on a bubble still pending unread content (idempotent with the natural flow).
- ChatInput: await the inner render/scroll promise before re-arming; poll
votes keep their own read flow in goToNextMention.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
#webk
morethanwords/tweb/master • 6cb2df2 • 1 files, +2/-2 Don't append live messages to the pinned-messag
Telegram github commits and releases
@tgappsupdatesBroadcast from the most important Telegram clients' repositories
4,538 subscribers
Open in Telegram