loadChats now carries each dialog's pin, member count and normalized newest
message so an app can order and preview chats as Telegram does.
downloadMessageFile takes max_edge to fetch a photo size that fits a bubble.
Telegram's apps count a supergroup's shared media together with the history
of the basic group it was upgraded from; getChat now names that group as
upgraded_from_chat_id so callers can do the same.
searchChatMembers returns a group's recent members with roles, custom
titles and normalized users; getUser reports presence, bot message access,
active username and profile photo; getChatMessageCount counts photos,
videos, files, audio, links, voice messages and GIFs through
messages.getSearchCounters. getChat now carries the member count and
description.
TL decoding had no double type, so any reply holding one failed whole:
every video's duration and every location is a double, which left a
signed-in account with no chats at all. Doubles now decode with up to
nine decimals and encode from JSON numbers.
A failed decode now says why (an unknown constructor and the type that
expected it, a truncated reply or unread bytes), and Telegram's own
error codes reach callers, so 404 still ends loadChats. Two text views
the current compiler rejects are copied or scoped.
When a restarted host asks for a code on a key that already accepted one,
Telegram answers AUTH_RESTART; continue at the two-step password instead of
requiring a new code.
Telegram closes idle connections, for example while an owner reads a login
code. Requests now reopen the connection with the same authorization key
and retry; repeated sends keep their random_id.
sendMessage uploads a local photo or document in 512 KiB parts (big-file
parts above 10 MiB) and can reply to a message. forwardMessages forwards
between chats; searchChats resolves @usernames and +phones and searches
contacts and public chats. Chats announce their profile photo, and
downloadChatPhoto saves it. Normalized messages name the message they reply
to and where a forward came from.
Dialogs carry a person's full name, Saved Messages, the newest message
and Telegram's mute state, so account mirrors can link every chat and skip
chats with nothing new. History replies report the whole history's size.
downloadMessageFile saves a message's largest photo or its document to a
new owner-only file in 512 KiB parts, through an authorized connection to
the file's data center, and reports its size, type, name and SHA-256.