Commit Graph

62 Commits

Author SHA1 Message Date
Lonami Exo
1b22d0eb12 Add missing await 2018-07-08 23:44:56 +02:00
Lonami Exo
44630542d0 Fix MessageAction not allowing access to media
This caused some issues with events.MessageEdited because
some MessageAction can trigger these edit updates such as
scoring in a game.
2018-07-03 14:13:44 +02:00
Lonami Exo
43afdb9d77 Fix-up 53fbfb2 for InputPeerChat or others 2018-07-03 14:05:42 +02:00
Lonami Exo
53fbfb215f Fix Telegram may omit entities' access hash in updates 2018-07-02 18:43:42 +02:00
Lonami Exo
0f5f6cc050 Fix opposite condition 2018-06-28 15:50:26 +02:00
Lonami Exo
ad01bda503 Fix custom.Message.buttons being None in channels (#870)
The implications behind this were bigger than expected. The sender
of the message is not actually needed for anything in the bot. The
bot itself may be needed, but only for KeyboardButtonSwitchInline.
2018-06-27 19:25:14 +02:00
chrizrobert
1eb4af33df Fix get_entities_text with cls (#866) 2018-06-26 15:58:55 +02:00
Lonami Exo
96e8b0b840 Remove get_fwd_sender 2018-06-26 12:38:58 +02:00
Lonami Exo
fc834f60fb Fix custom.Dialog passing the wrong instance to custom.Draft 2018-06-25 21:24:46 +02:00
Lonami Exo
410518aa65 Stop using await with properties 2018-06-25 11:38:56 +02:00
Lonami Exo
0d09f9d8c1 Create a custom.Forward class 2018-06-25 11:34:10 +02:00
Lonami Exo
efc9f4c414 Get rid of all remaining async properties 2018-06-25 11:03:20 +02:00
Lonami Exo
266d44dd86 Fix EventsCommon still having async properties 2018-06-24 13:05:58 +02:00
Lonami Exo
0d0e78e10b Use the right chat peer in private messages 2018-06-23 15:10:07 +02:00
Lonami Exo
8d98c04932 Fix awaits on input_chat property 2018-06-22 10:05:29 +02:00
Lonami Exo
5e322a6ca9 Remove async properties from custom.Message
Awaiting on a property was strange and only really made sense
in events.NewMessage. Methods like client.get_messages() and
similar return entire custom.Message which won't need to touch
the network, and requiring the await was a poor UX.
2018-06-21 21:15:48 +02:00
Lonami Exo
8d5c052fce Fix TypeError when accessing unexisting sender 2018-06-21 09:26:31 +02:00
Lonami Exo
c85ba4accc Revisit documentation, cross-references and unnecessary indents 2018-06-20 11:06:03 +02:00
Lonami Exo
ee7a44d447 Return an empty list from get_entities_text if no entities 2018-06-18 13:54:09 +02:00
Lonami Exo
56ddaaee6f Make non-fwded messages sent to yourself outgoing 2018-06-16 17:35:24 +02:00
Lonami Exo
b7286be3b0 Get the "correct" chat in private incoming messages 2018-06-15 12:46:41 +02:00
Lonami Exo
24d2074e0c Set _input_chat on custom.Message creation/fixup input_chat 2018-06-14 23:40:44 +02:00
Lonami
bb3a564500
Merge pull request #843 from LonamiWebs/core-rewrite
Core rewrite
2018-06-14 16:25:28 +02:00
Lonami Exo
d4dc147459 Handle DraftMessageEmpty (closes #844) 2018-06-12 19:25:13 +02:00
Lonami Exo
2a90de2b08 Fix broadcast being named post for is_group property 2018-06-12 12:31:37 +02:00
Lonami Exo
f581db294a Better custom.MessageButton.click() docs 2018-06-11 10:25:57 +02:00
Lonami Exo
aa6d3430ae Properly handle bot timeouts when clicking buttons 2018-06-11 10:20:22 +02:00
Lonami Exo
f86f52d960 Fix async_generator's and missing awaits 2018-06-10 22:00:55 +02:00
Lonami Exo
d462b04a9c Add async/await on tl.custom 2018-06-10 20:29:57 +02:00
Lonami Exo
0418f7e375 Fix get_entities_text and allow filtering by type 2018-06-07 10:46:32 +02:00
Lonami Exo
8c8a0153ef Revert 9db9d1e's count and fix typo 2018-06-03 15:20:52 +02:00
Lonami Exo
b2ed6caff4 Fix setattr for events.NewMessage/custom.Message 2018-06-03 13:00:07 +02:00
Lonami Exo
0a3151175d Fix infinite recursion on setattr custom.Message 2018-06-03 12:29:30 +02:00
Lonami Exo
8d7c7a19c0 Add some setters for custom.Message 2018-06-03 11:53:18 +02:00
Lonami Exo
8b16023566 Allow setting a per-client default parse mode 2018-06-03 11:29:48 +02:00
Lonami Exo
f7222407de Document custom.Message 2018-06-02 12:52:38 +02:00
Lonami Exo
6dcd0911a7 Move events.NewMessage properties to custom.Message 2018-06-02 12:30:25 +02:00
Lonami Exo
e2ce55871e Replace custom.Message's class on creation 2018-06-01 21:20:34 +02:00
Lonami Exo
9db9d1ed5c Implement __bytes__ and use count instead sum 2018-05-31 22:39:32 +02:00
Lonami Exo
2191fbf30b Fix custom.Message.click not having buttons 2018-05-31 14:10:19 +02:00
Lonami Exo
a1c511429e Port NewMessage.edit/delete to custom.Message 2018-05-31 14:01:42 +02:00
Lonami Exo
66d5443fcd Add custom.Message.fwd_from_entity 2018-05-31 13:56:33 +02:00
Lonami Exo
58f621ba82 Make custom.Message more consistent with previous patches 2018-05-31 13:50:08 +02:00
Lonami Exo
5aed494aac Fix custom.Message special methods 2018-05-31 12:50:08 +02:00
Lonami Exo
192b7af136 Lazily load user/input user on Message 2018-05-31 12:24:25 +02:00
Lonami Exo
aa70436441 Add a custom Message class 2018-05-31 10:32:32 +02:00
Lonami Exo
68bb8e8b91 Add is_user/group/channel and title to Dialog 2018-05-30 19:20:27 +02:00
Lonami Exo
395e702586 Make py:obj default Sphinx's role 2018-03-28 16:03:47 +02:00
Lonami Exo
ae2abd2ba9 Add __str__/.stringify() to tl.custom for completeness 2018-03-27 11:08:40 +02:00
Lonami Exo
1c9dc8dc63 Fix getting ID on custom Dialog class from dce0fd9 2018-03-24 18:44:13 +01:00