Telethon Updates
1.48K subscribers
29 photos
21 files
1.35K links
Official channel for updates about Telethon.
Official English group: @TelethonChat

Other channels:
• Russian: @TelethonRussian
• Persian: @TelethonGap
• Snippets: @TelethonSnippets2
Download Telegram
With recent Telegram changes, Message.from_id is now a Peer and not a int because it has to represent that the message may come from a Chat now, and not a User.

Telethon has the possibility of keeping that field as int to remain being the marked sender ID, and save the new field under a different name like from_peer. However, even "raw API" would be affected and the field names would no longer match with what Telegram calls them, which could be confusing and adds yet another special case to the code.

Telethon has offered Message.sender_id for a long time, and it has been and will remain being the marked integer ID of the sender. After all, Message.from_id was a field coming from raw API, and raw API is prone to breaking in minor releases as it's known when layers change.

Therefore the options are:
• Proceed as normal with layer upgrades and change the raw fields. People wanting the integer ID can use (and should have been using) .sender_id.
• Special case the field and give it a new name, preserving the old one to be an integer.

In any case, developers need to now expect that the sender can be something other than a User, despite the decision made.
Telethon Updates pinned «With recent Telegram changes, Message.from_id is now a Peer and not a int because it has to represent that the message may come from a Chat now, and not a User. Telethon has the possibility of keeping that field as int to remain being the marked sender ID…»
Add new get_permissions method (#1575) (fc765f6 by kolay-v)
Add missing check for permissions.is_creator (#1578) (3e188d0 by apepenkov)
Follow PEP 518 (180105a by Lonami)
Fix Python 3.5 compatibility issue (bb3ccca by Lonami)
Update documentation to include the new friendly method (52a247c by Lonami)
Add additional asserts to debug issue with peer empty channels (cb92a40 by Lonami)
Fix from_users filter not accounting for None from_id (20606b3 by Lonami)
Expect BufferError during automatic reconnect (185a93a by Lonami)
Only reset auth_key on error -404 (09f4c5c by Lonami)
Fix get_permissions in chats and when using self user (#1584) (ce120cb by Nick80835)
Add anonymous permission to edit_admin and get_permissions (7f61b92 by Lonami)
Improve documentation for ParticipantPermissions (cf1645b by Lonami)
Avoid redundant code in ParticipantPermissions (05af5d0 by Lonami)
Support Message.click() for polls (#1583) (ce71b32 by khoben)
Add support for local_ip address binding (#1587) (d2756cf by stha)
Revert add_admins property logic since it differs from the rest (5722ba8 by Lonami)
Don't try to reconnect when authkey is invalid (026c992 by Lonami)
Fix ChatAction check for self-user joining a chat (e28fbc6 by Lonami)
Fix iter_messages(from_users='me') (61b0f09 by Lonami)
Fix internal get_me() was not expecting network errors (#1594) (d0faaa2 by vegeta1k95)
Expose entity parameter in client.inline_query (adf52a1 by Lonami)
Document two new RPC errors (#1591) (7de1c0e by AndrewLaneX)
Fix .photo()/.document() inline results excluding media from msg (15f7c27 by Lonami)
Support not including the media from inline results in the msg (7c3bbac by Lonami)
Fix sending of documents in inline results (9c5b9ab by Lonami)
Improve inline result documentation with more examples (312dac9 by Lonami)
Use inline result mime to infer the result type (3ff09f7 by Lonami)
Call sign_in during sign_up if needed to send the code (4e1f582 by Lonami)