Commit Graph

2593 Commits

Author SHA1 Message Date
Dan
8aa358129c Use specialized exceptions for handling security checks 2021-12-16 21:38:24 +01:00
Dan
a720726479 Remove unneeded assertion 2021-12-16 21:05:01 +01:00
Dan
ed9c7e4694 Simplify the error handling a bit 2021-12-15 19:26:54 +01:00
Dan
c2a29c8c30 Tune stored_msg_ids max size 2021-12-15 16:56:08 +01:00
Dan
2a1af2b8e9 Close and reestablish the TCP connection in case of mismatch 2021-12-15 16:02:39 +01:00
Dan
bc420da0e2 Maintain a sorted list of stored_msg_ids 2021-12-15 15:04:44 +01:00
Dan
cd027b8c1c Implement missing MTProto checks 2021-12-15 13:18:13 +01:00
Dan
bf9e186414 Also fetch peer_id user details 2021-12-09 20:12:13 +01:00
Dan
a73f990667 Improve parsing of Chat 2021-12-08 07:46:41 +01:00
Dan
8a08dcb92a Update UserFull according to the new schema 2021-12-08 07:43:02 +01:00
Dan
439935b401 Fix wrong sender_chat 2021-12-07 22:39:56 +01:00
Dan
e2cce1b1e6 Check empty messages first of all 2021-12-07 20:29:46 +01:00
Dan
8d03850d03 Don't propagate errors when fetching missing user details 2021-12-07 20:22:29 +01:00
Dan
85ee6c3785 Fetch user details in case they are missing 2021-12-07 19:40:06 +01:00
Dan
34b6002c68 Fix joinchat links regex 2021-12-06 14:16:49 +01:00
Dan
f7db103071 Fix missing argument 2021-12-04 18:40:22 +01:00
Dan
2e964b3fa9 Update MAX_USER_ID 2021-12-04 18:39:35 +01:00
Dan
804d00fa0f Update get_me.py 2021-11-26 18:07:28 +01:00
Dan
2265d282f5
Add search_global_count and search_messages_count methods (#768) 2021-10-11 14:27:31 +02:00
Dan
6efd01937f
Fix issues with Python 3.10 (#766) 2021-10-06 17:12:49 +02:00
Dan
428cbf56a6
Read integers first when size matches 2021-09-25 10:12:12 +02:00
Dan
09c8289259
Update iter_dialogs.py
Closes #749 #750 #756
2021-09-15 17:55:01 +02:00
Alisson Lauffer
02a3969101
Fix Message.command when case is different (#757)
* Fix Message.command when case is different

* Update test_command.py

Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
2021-09-14 18:33:54 +02:00
Davide Galilei
fdbab8cc87
Final fix for reading vectors of bare longs (#754) 2021-09-11 14:52:34 +02:00
Dan
acd92b100b
Actually fix reading vectors of bare longs 2021-09-11 14:32:05 +02:00
Dan
c3953c18ca
Fix reading vectors of bare longs (#752) 2021-09-10 20:57:06 +02:00
rking32
bacc7c004b
Improve the async-to-sync wrapper (#744)
* improved async to sync wrapper

* Create a new loop in non-main threads & improve readability

* Do not run_coroutine_threadsafe unless it's outside the loop

Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
2021-08-29 12:05:48 +02:00
Md. Hasibul Kabir
e68da74e89
Further improve the session-switching mechanism for inline bots (#739)
* Ability to run multiple bot.

Global session creates a problem for other bot. As that session was generated for another bot can't be used by this bot.

* Use the existing media session lock

Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
2021-08-29 10:49:47 +02:00
DatDraggy
aea1ffc46f
Fix old non existing can_send_[sticker...] with can_send_other_messages (#746)
c9d0c5d75a
2021-08-29 08:38:32 +02:00
Gautam Kumar
9e9a944e86
Fix parameter name being in plural (#724) 2021-08-28 14:42:16 +02:00
Jonathan
99e152a67c
Fix accessing non-existent attribute (#747)
This should solve the error `AttributeError: 'ChatParticipantsForbidden' object has no attribute 'participants'` and apply the commit 062a6ce6dd on this file, too.
2021-08-28 14:40:10 +02:00
餅喵
4d933b80f9
Fix TL schema naming conflicts (#690)
* Avoid variable conflicts with Telegram TL schema

* Fix game button with no data attached to button

* Update combinator.txt

* Update compiler.py

* Update tl_object.py

Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
2021-08-28 10:01:12 +02:00
Dan
8845b976ab
Fix docs (#699) (#703)
* Fix docs (#699)

* typo fixing

* Update inline_query_result_video.py

* layer update 129 (commits)

* fixes

* Update main_api.tl

* Update main_api.tl

Co-authored-by: BelgenOp <76117511+BelgenOp@users.noreply.github.com>
2021-06-23 17:01:06 +02:00
Shrimadhav U K
685b9328f8
Add missing parameters in reply_document (#700) 2021-06-22 10:40:13 +02:00
Dan
a65f8e2655 Clearer error message 2021-06-20 08:52:11 +02:00
Dan
91e0a08945 Merge branch 'chat-permissions-others' 2021-06-01 13:58:28 +02:00
Dan
0ca8ab29ab Merge branch 'in-memory-media-group' 2021-06-01 13:57:50 +02:00
Dan
523ed3e7cb Add support for in-memory uploads in send_media_group (#519)
* Add support for in-memory uploads for send_media_group

* update input_media_photo docs

* update type hints

Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
2021-06-01 13:57:31 +02:00
Dan
c9d0c5d75a Sync chat permissions with official clients 2021-05-31 20:23:32 +02:00
Dan
6cb3e92838 Reword a note 2021-05-22 10:01:46 +02:00
Christy Roys
0d12d8c1bb
Add support for in-memory uploads in send_media_group (#519)
* Add support for in-memory uploads for send_media_group

* update input_media_photo docs

* update type hints

Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
2021-05-22 10:00:23 +02:00
Dan
317685cf54 Further improve the HTML parser
Related to #682
2021-05-15 18:35:57 +02:00
Dan
7c9f1cb8ef Improve the HTML parser
Fixes #682
2021-05-15 18:14:27 +02:00
Ripe
be83f8e25e
Actually fix inline message id invalid (for inline message queries) (#683)
* Fix Inline Message ID Invalid

* Update inline_session.py

* Update inline_session.py

Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
2021-05-15 07:06:37 +02:00
Dan
dd32854db4 Squashed commit of the following:
commit d6dcf98d7445cbdc2a036deca57207c14bc354fc
Author: Dan <14043624+delivrance@users.noreply.github.com>
Date:   Wed May 12 09:35:18 2021 +0200

    Rename get_chat_onlines to get_chat_online_count

commit 21ff2a39d856ebc939ce9b15810198c82a9c23c6
Merge: 808c629f 29701a3a
Author: Dan <14043624+delivrance@users.noreply.github.com>
Date:   Wed May 12 09:32:59 2021 +0200

    Merge branch 'master' into get-chat-online-count

commit 808c629f43b185bc0df8337a82f5ecc860bbdb94
Author: Andriel Rodrigues <andrielkogama2@gmail.com>
Date:   Wed May 12 04:28:53 2021 -0300

    Add get_chat_online_count method (todo) (#654)
2021-05-12 09:39:51 +02:00
Dan
29701a3a55 Fix import errors 2021-05-12 09:27:39 +02:00
Gaetano
a4bb2a3fdf
Fix typo in send_video examples (#679) 2021-05-12 09:13:19 +02:00
Dan
e2ef053949 Merge remote-tracking branch 'origin/master' 2021-05-12 09:11:57 +02:00
Dan
5fdb361487 Fixes for InlineQueryResult{Audio,Video} 2021-05-12 09:11:52 +02:00
LёNya
a56b1a3287 add InlineQueryResultVideo 2021-05-12 08:56:44 +02:00