morethanwords/tweb/master • 2d8f999 • 3 files, +45/-11 Name the second person typing instead of coun

Telegram github commits and releases

Telegram github commits and releases

@tgappsupdates

Broadcast from the most important Telegram clients' repositories

4,538 subscribers
Open in Telegram
morethanwords/tweb/master2d8f9993 files, +45/-11
Name the second person typing instead of counting them as an other

getPeerTyping moves to the multi strings the moment a second typing arrives, so
two people in a group read as "Максим and 1 others are typing" — a count that
costs a name it already has, and reads wrong in the singular on top of that.

Both reference clients special-case the pair. tdesktop branches at typingCount
> 2 in HistoryView::SendActionPainter and otherwise formats lng_users_typing,
"{user} and {second_user} are typing"; iOS does the same in ChatListTypingNode
with DialogList.MultipleTypingPair. The count only starts at three.

A pair map, mirroring multi, now answers for typings.length === 2, and the two
peer titles resolve in parallel instead of the single one plus a count. It stays
keyed on the action, unlike iOS — which collapses every multiple to plain typing
— so the per-action multi strings tweb already has keep working for a pair as
well: two people both sending photos still say so, and a pair doing different
things falls back to typing exactly as three would. Multi now starts at three,
which also puts its own "and 1 others" out of reach.

Verified in a preview against a real group, driving getPeerTyping with stubbed
typings: one typing gives "Mira is typing", two give "Mira and Durger King are
typing", two both uploading photos give "... are sending photos", two doing
different things fall back to "... are typing", and three give "Mira and 2
others are typing".

The eight new keys ship in lang.ts and the generated langPack.strings, and need
uploading to the webk langpack to reach an existing install: checkLangPackForUpdates
merges a server difference only, and the local re-merge in index.ts sits behind
IS_BETA, so a client holding a cached langpack finds no entry and format() falls
back to printing the key itself. Three and up keep their existing strings.

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

#webk
Open post in Telegram