Commit Graph

69 Commits

Author SHA1 Message Date
Lonami Exo
e71638abf1 Document that now incoming private messages can be revoked 2019-03-25 08:46:44 +01:00
Lonami Exo
0b4d64947b Fix CallbackQuery.edit for messages via inline queries 2019-03-23 19:25:45 +01:00
Lonami Exo
f6c4ab6f41 Workaround #1124 (Telegram ignoring offset_date) 2019-03-18 17:36:06 +01:00
Lonami Exo
7c48857d0c Update docs for send_file/timeouts and add new known error 2019-03-18 17:34:48 +01:00
Lonami Exo
9d5344e90d Fix-up file to media calls from edit (from 3d72c10) 2019-03-12 22:18:57 +01:00
Lonami Exo
8884015dae Clarify some docstrings 2019-03-10 13:29:34 +01:00
Lonami Exo
df534585e9 Actually fix ids= not being a list, bump 1.6.1 2019-02-28 08:31:28 +01:00
Lonami Exo
2681dc09bb Fix iter_messages with ids= not being a list 2019-02-28 08:26:37 +01:00
Lonami Exo
d02d0e2d5e Handle negative limits gracefully in async generators
We rely on >= 0 for setting the batch size to use (which must
be valid), so it makes sense to make negative limits equal 0.

This is similar to how asyncio.sleep(negative) sleeps 0 seconds,
despite the fact that time.sleep(negative) fails.
2019-02-27 13:01:04 +01:00
Lonami Exo
d508e58d49 Remove the "private" _total parameter 2019-02-27 12:59:50 +01:00
Lonami Exo
bf71e49fcc Remove batch_size parameter from iter_messages
It was only useful for testing purposes, and no other methods
exposed this kind of parameter (but they still use it).
2019-02-27 12:57:54 +01:00
Lonami Exo
c73b8eda26 Simplify filling RequestIter's buffer 2019-02-27 11:25:35 +01:00
Lonami Exo
5b8e6531fa Add method to collect RequestIter into TotalList 2019-02-27 10:15:32 +01:00
Lonami Exo
6d6c1917bc Implement iterator over message by IDs 2019-02-27 10:04:12 +01:00
Lonami Exo
60606b9994 Don't make iter_messages a coroutine function 2019-02-27 09:49:14 +01:00
Lonami Exo
35dc46ffb0 Fix searching messages in reverse 2019-02-27 09:48:47 +01:00
Lonami Exo
e3991fadd5 Fix updating offset 2019-02-27 09:37:12 +01:00
Lonami Exo
f765f73fa3 Fix setting batch size 2019-02-27 09:32:33 +01:00
Lonami Exo
e2f44ddbea Make iter_messages use a common message iterator 2019-02-27 09:31:15 +01:00
Lonami Exo
19f38d6733 Implement iter_messages with search 2019-02-26 21:04:46 +01:00
Lonami Exo
36eb1b1009 Create a new RequestIter ABC to deal with iter methods
This should make it easier to maintain these methods, increase
reusability, and get rid of the async_generator dependency.

In the future, people could use this to more easily deal with
raw API themselves.
2019-02-26 20:26:40 +01:00
Lonami Exo
1e4a12d2f7 Clean up iter_messages with reverse=True 2019-02-26 09:42:28 +01:00
Lonami Exo
abd26af0ad Update misleading error message 2019-02-07 10:16:03 +01:00
Lonami Exo
8492300780 Fix search in private chats when from_user was not given 2019-01-31 11:11:20 +01:00
Lonami Exo
5ac88f764d Fix and update links in the documentation 2019-01-12 13:06:14 +01:00
Lonami Exo
fbf7f75b00 Fix send_message with buttons not always returning ReplyMarkup 2019-01-12 12:53:21 +01:00
Tulir Asokan
f271316d7d Make logger fully configurable (#1087) 2019-01-11 15:52:30 +01:00
Lonami Exo
b66c1e6084 Revert "Get rid of now broken cache"
This reverts commit f73ae42a03.
2018-12-25 16:50:11 +01:00
Lonami Exo
a6c3c382b4 Except MessageIdsEmptyError when getting messages by ID
This error may occur even when the IDs are not actually empty.
2018-12-25 12:17:24 +01:00
Lonami Exo
f73ae42a03 Get rid of now broken cache 2018-12-25 11:44:10 +01:00
Lonami Exo
2aa089f29c Prevent KeyError in forward_messages 2018-12-20 20:33:25 +01:00
Lonami Exo
9a6f4d35f2 Fix crash on get_messages(ids=InputMessageReplyTo) 2018-11-29 14:19:56 +01:00
Lonami Exo
09b16f96fc Better behaviour for send_read_acknowledge 2018-11-24 20:53:28 +01:00
Lonami Exo
d6ec883cd9 Ignore iter_messages from_user unless it's a User 2018-11-19 08:55:49 +01:00
Lonami Exo
32c884d543 Revert d392939 and use empty tuple as a sentinel value 2018-10-08 11:33:56 +02:00
Lonami Exo
8c14259728 Update documentation with new sections 2018-10-06 20:20:11 +02:00
josephbiko
3dd8b7c6d1 Support async def in sessions (#1013) 2018-10-05 20:25:49 +02:00
Lonami Exo
d392939018 Create a default module to use as a sentinel value
This looks better in the documentation than utils.Default,
cleans the utils with specific stuff like this, and users
may use it more easily.
2018-10-05 14:20:50 +02:00
Lonami Exo
db8bea3968 Fix getting messages by ID for private chats 2018-09-16 15:45:38 +02:00
Lonami Exo
dda1f0b1dd Stop copying reply when resending Message, fix file replies 2018-08-19 11:49:36 +02:00
Lonami Exo
e3bf6e3330 Document reply markup limits 2018-08-07 12:46:05 +02:00
Lonami Exo
7cce7aa3e4 Return helpers.TotalList instances on client.get_ methods 2018-08-02 23:00:10 +02:00
Lonami Exo
f0a26d7c76 Implement global search (closes #920) 2018-07-29 23:16:22 +02:00
Lonami Exo
6c51c35ccf Fix _iter_ids not expecting InputChannel 2018-07-24 18:20:34 +02:00
Lonami Exo
1c0d595205 Replace custom.Message creation with ._finish_init 2018-07-22 19:20:55 +02:00
Lonami Exo
3bdfd4b32c Make build_reply_markup public 2018-07-21 13:55:26 +02:00
Lonami Exo
e902304360 Expose silent parameter when sending messages 2018-07-11 10:16:21 +02:00
Lonami Exo
ea07cf8d12 Add buttons parameter to client.edit_message 2018-07-10 17:59:13 +02:00
Lonami Exo
531a02a2a1 Support buttons when sending a file too 2018-07-10 17:59:13 +02:00
Lonami Exo
8c28be04bc Create a custom.Button class and support send_message(buttons=...) 2018-07-10 17:59:13 +02:00