Commit Graph

71 Commits

Author SHA1 Message Date
Lonami Exo
a0cda0c37c Remove client-side checks when editing permissions
The server should instead fail with proper RPC errors,
as the rules could change any time (and the local checks
get out of date).
2023-07-21 22:53:38 +02:00
rozha
1e63de9b68
Fix lack of support for anon channel restrictions (#4130) 2023-06-09 17:42:34 +02:00
Lonami Exo
949b54fdb0 Fix edit_admin failing on small Chat 2022-10-13 17:56:47 +02:00
Lonami Exo
ff0f9b0e8f Ignore ChannelParticipantLeft during iter_participants
Closes #3231.
2022-09-20 18:12:29 +02:00
Lonami Exo
d7424ccb90 Ignore aggressive parameter in iter_participants
It's broken (it causes flood wait immediately).
Closes #3787.
2022-09-20 17:35:25 +02:00
Lonami Exo
18da855dd4 Fix get_permissions for small group chats
Closes #3811.
2022-09-20 16:17:45 +02:00
Devesh Pal
391fbab674
Implement Sticker Choosing Action (#3144) 2021-09-01 15:08:58 +02:00
Lonami Exo
9285e50c63 Handle non-user bans when iterating banned participants
Closes #3105.
2021-08-22 13:24:02 +02:00
Lonami Exo
2df1dd7215 Don't call getFullChannel during iter_participants unless necessary
This should reduce the floodwaits of this request by a lot.
2021-07-09 20:11:21 +02:00
MiyukiKun
249670827c
Change manage_call permission to default to None (#3093) 2021-07-02 21:42:57 +02:00
Anonymous
7c5efee1de
Update to layer 129 and other additions/enhancements (#3074)
* Apply code corrections for the new layer types.
* Support not passing `user` to `get_permissions`.
* `download_profile_photo` now supports `MessageService`.
* `thumb` in send and edit message.
* Document new known errors.
2021-06-15 22:57:32 +02:00
Lonami Exo
f326769fa8 Add support for messages to get_stats 2021-03-20 20:20:36 +01:00
Lonami Exo
3ee94bdc5e Update known errors and error message
Closes #1713
2021-03-07 16:09:47 +01:00
Lonami Exo
d0ee3c3a56 Return the service message produced when kicking somebody
Helps with #1664.
2021-01-02 12:13:53 +01:00
Lonami Exo
0a4d54fca4 Update to layer 122
Closes #1645.
2020-12-11 16:55:49 +01:00
Lonami Exo
4db51dff8a Update to v1.17 2020-10-18 14:11:52 +02:00
Lonami Exo
cf1645b598 Improve documentation for ParticipantPermissions 2020-10-06 11:14:16 +02:00
Lonami Exo
7f61b92f81 Add anonymous permission to edit_admin and get_permissions 2020-10-06 11:14:16 +02:00
Nick80835
ce120cba13
Fix get_permissions in chats and when using self user (#1584) 2020-10-05 19:21:07 +02:00
kolay
fc765f6014
Add new get_permissions method (#1575)
Closes #1574.
2020-10-03 16:59:54 +02:00
Lonami Exo
75fbd28d3e Add a workaround for sometimes-missing photos from channels 2020-09-22 11:08:17 +02:00
Lonami Exo
73109eb819 Add a workaround for channels that claim have no photos but do 2020-08-13 15:13:29 +02:00
Lonami Exo
f18ab08334 Add new friendly method to get channel stats 2020-07-26 13:45:30 +02:00
Lonami Exo
393da7e57a Expose missing embed_links param in edit_permissions 2020-05-09 17:35:26 +02:00
TishSerg
a16c60c886
Fix action 'song' should alias 'audio' (#1444) 2020-04-26 11:00:00 +02:00
Lonami Exo
fa736f81af Handle all entity types on isinstance checks
Only the uses of `isinstance` against `InputPeer*` types were
reviewed. Notably, `utils` is exempt on this because it needs
to deal with everything on a case-by-case basis.

Since the addition of `*FromMessage` peers, any manual `isinstance`
checks to determine the type were prone to breaking or being
forgotten to be updated, so a common `helpers._entity_type()`
method was made to share this logic.

Since the conversion to `Peer` would be too expensive, a simpler
check against the name is made, which should be fast and cheap.
2019-12-23 13:52:07 +01:00
YouTwitFace
b862f215c5 Ignore channel-only permissions in megagroups (#1292) 2019-10-11 18:04:41 +02:00
Tanner Collin
72dd36bc17 Allow edit_admin on yourself (#1285) 2019-09-29 09:19:44 +02:00
penn5
88d8424474 Fix kick_participant in channels (#1284)
Presumably some server-side change made insta-unbanning no longer work.
2019-09-28 09:38:41 +02:00
Lonami Exo
67183ff9e8 Improve method signatures in the docs 2019-09-08 10:56:35 +02:00
Lonami Exo
00b0319397 Update to layer 104 2019-08-14 00:03:24 +02:00
Lonami Exo
e1905d0d7a Avoid using telethon.sync in the examples 2019-08-13 23:33:39 +02:00
Lonami Exo
d3221a508a Add kick_participant 2019-08-01 19:21:01 +02:00
Lonami Exo
5498d14e54 Fix default edit_permissions and clarify documentation 2019-07-23 10:14:31 +02:00
Lonami Exo
cbcbda5276 Minor documentation and type hint updates 2019-07-17 12:37:16 +02:00
Lonami Exo
944fb10733 Add missing return self on action/download ctx managers 2019-07-13 21:21:29 +02:00
painor
ae1c1b3912 Improve permission-related errors (#1231) 2019-07-10 23:19:50 +02:00
Lonami Exo
97e4d83593 Rename and clarify docs for edit_permissions 2019-07-06 19:31:33 +02:00
Lonami Exo
8e36bb4c4d Link Python keywords with Python's documentation 2019-07-06 12:11:00 +02:00
painor
2d2afc5280 Add edit_admin and edit_restrictions (#1210) 2019-07-05 10:48:21 +02:00
Lonami Exo
9322c37a94 Document iteration order 2019-06-28 20:44:06 +02:00
Lonami Exo
b6b4ea669d Remove messy subclassing in the TelegramClient
Since it was easy to cause MRO inconsistencies, and it's
not really needed now that self is type hinted as the client.
2019-06-24 17:48:46 +02:00
Lonami Exo
e47f3ec1d6 Clarify some aspects of the documentation 2019-06-01 16:28:20 +02:00
Lonami Exo
9ea686ab14 Create new client.iter_profile_photos method 2019-05-30 16:51:19 +02:00
Lonami Exo
a9ff328e38 Fix iter_participants search on small group chats 2019-05-20 14:02:51 +02:00
Lonami Exo
7c1c040d50 Update docstrings to have consistent style 2019-05-20 11:57:11 +02:00
Lonami Exo
0a3d6106f0 Completely overhaul the documentation 2019-05-09 12:50:09 +02:00
Lonami Exo
d92d989569 Quote type hints
Otherwise, sphinx completely butchers the documentation.
2019-05-08 17:16:09 +02:00
Lonami Exo
cd4b915522 Add type hints to all public methods in the client 2019-05-03 21:38:41 +02:00
Lonami Exo
9090ede5db Reduce __enter__/__exit__ boilerplate for sync ctx managers 2019-04-13 10:53:33 +02:00