Docs Dark mode, Reactions, Spoiler Texts and more
A team of cryptographers at ETH Zürich (Switzerland) 1 has performed a security analysis of Pyrogram’s implementation of the MTProto 2.0 protocol, which resulted in a discovery of a vulnerability. More in details: the implementation was missing some checks listed here https://core.telegram.org/mtproto/security_guidelines#checking-msg-id. The vulnerability has been promptly patched within the usual industry practice of a 90-day disclosure period. All users are strongly encouraged to update to the latest version of Pyrogram.
New Features & Additions
Added Dark Mode to the documentation. You can switch between Light, Dark and Auto themes on the fly.
Added support for spoiler text via markdown
Added support for protected content messages. Added the parameter
protect_contentto all applicable
Added support for channel comments via the new method
get_discussion_message(). Get the discussion message from the linked discussion group of a channel post and reply to it to leave a comment.
Added support for “send_as” chats. You can send messages in groups on behalf of another channel. Added the methods
set_send_as_chat(). Added the field
Added support for bot commands with trailing usernames. Now
filters.command("start")will recognise both
Added the field
chat_typeto the type
Message.serviceare now strings and contain the name of the media or service message instead of a boolean value. This way you can tell which media or service message is by looking at the attribute.
Added support for in-memory uploads in
Added support for mentioning users by their ID in inline keyboards via the new
Added the fields
pending_join_request_countto the type
Added event handlers about new requests to join a chat. Added
Added support for the choose_sticker and import_history action in the method
Chat permissions are now the same as the ones seen in official clients. This means you cannot set sticker, gif, game and inline bot permission singularly anymore, but they all fall under the
All “kick(ed)” occurrences have been replaced by “ban(ned)”. This means the method
kick_chat_memberhas been renamed to
ban_chat_member()and the “kicked” filter to be used in
get_chat_members()has been renamed to “banned”.
The team of cryptographers: Theo von Arx and Kenneth G. Paterson.