Commit Graph

1516 Commits

Author SHA1 Message Date
Tulir Asokan
f271316d7d Make logger fully configurable (#1087) 2019-01-11 15:52:30 +01:00
Manuel1510
eda4178333 Add hide_via to InlineResult.click (#1084) 2019-01-10 23:42:58 +01:00
Lonami Exo
ca2c8687c8 Expect UserEmpty on get_input_entity 2019-01-08 10:58:58 +01:00
Lonami Exo
d892a537a7 Support get_peer on participants and clarify some strings 2019-01-07 16:13:37 +01:00
Lonami Exo
e565552ae9 Update to v1.5.2 2019-01-05 17:37:52 +01:00
Lonami Exo
0a147d5b95 Add new takeout method 2019-01-05 17:18:40 +01:00
Lonami Exo
1544577757 Don't raise inside __del__ (#1073) 2019-01-04 11:26:57 +01:00
Lonami Exo
f99b4874c8 Support passing media objects to inline results (#1053) 2019-01-04 11:15:11 +01:00
Lonami Exo
4b9b77614f Support answering inline queries with empty text (#1053) 2019-01-04 11:13:13 +01:00
Lonami Exo
8c0250f775 Locally check dialog's offset date (#1043)
Telegram ignores the parameter if it's alone.
2019-01-03 22:35:07 +01:00
Lonami Exo
c51a17bf9a Actually make AdminLogEvent work
Ideally this would have been tested before release one commit ago.
2019-01-03 22:25:50 +01:00
Lonami Exo
77be6a2755 Update to v1.5.1 2019-01-03 19:43:48 +01:00
Lonami Exo
eda8d0dbc8 Support configuring the reply markup through buttons 2019-01-03 19:03:47 +01:00
Lonami Exo
2631144702 Add more properties to the client to make media more convenient 2019-01-03 18:34:29 +01:00
Lonami Exo
4ccabaf422 Add friendly method to get admin log (#952) 2019-01-03 13:09:59 +01:00
Lonami Exo
95cf873bad Don't mark the user as connected until successfull connection
The idea behind distinguishing between the user being connected and
the actual connection having been made was to support retries while
the user decided to connect, even if the connection wasn't made yet.

The problem is that _user_connected is used directly to tell whether
the sender is connected or not which will be wrong if an exception
occurs on the initial connection. Since the logic retry isn't used
there we can simply mark as connected once a successfull connection
is made.
2019-01-02 10:53:10 +01:00
Lonami Exo
229969192a Fix UnicodeDecodeError with malformed input on unparse text 2019-01-01 20:31:39 +01:00
Lonami Exo
619e4dc2d6 Fix get_peer for int which made ab557a8 useless 2018-12-28 17:54:15 +01:00
Lonami Exo
4ad9c9bf31 Add TLObject.to_json() for convenience 2018-12-27 20:15:35 +01:00
Lonami Exo
f1157b8fd1 Return downloaded bytes when file=bytes 2018-12-27 19:05:52 +01:00
Lonami Exo
342a4dd502 Update to v1.5 2018-12-25 17:55:15 +01:00
Lonami Exo
fc46e1ec20 Workaround file references by using empty byte strings for cache
They seem to work for now, so until there is a need to update it,
cache will just rely on empty byte strings for the file_reference.
2018-12-25 17:02:33 +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
382106aafb Check g when password's prime is known to be good 2018-12-25 10:59:16 +01:00
Lonami Exo
18f457a41d Add missing file_reference to InputDocument 2018-12-25 01:04:45 +01:00
Aaron Gallagher
b0e0bc3701 Extend new_algo.salt1 to fix edit_2fa (#1072)
The salt1 that is sent to the server requires an additional 32 bytes
of random data. It's easy to miss this requirement from reading the 
tdesktop source, because this extension is done in a function called
`ValidateNewCloudPasswordAlgo`.

https://github.com/telegramdesktop/tdesktop/blob/2e5a0e056cdb40d61d487c6062bffe1a835f
6ddd/Telegram/SourceFiles/core/core_cloud_password.cpp#L210-L211
2018-12-24 21:16:09 +01:00
Lonami Exo
deb6ca0da0 Fast-path good known prime in 2fa 2018-12-24 20:17:31 +01:00
Lonami Exo
de74711e82 Implement click for KeyboardButtonGame 2018-12-24 17:56:30 +01:00
Lonami Exo
f16ed8235c Add new is_bot method to check if the logged-in user is a bot 2018-12-24 17:32:34 +01:00
Lonami Exo
ab557a8cef Use getUsers/getChannels with hash 0 on get_input_entity 2018-12-24 17:32:16 +01:00
Lonami Exo
46fea3fc93 Implement clearing password in edit_2fa 2018-12-24 16:30:45 +01:00
Lonami Exo
6823b6c691 Remove old code to get the hash of a password 2018-12-24 14:47:39 +01:00
Lonami Exo
d2ac7e5b0a Actually perform all checks in 2fa 2018-12-24 14:16:50 +01:00
Lonami Exo
a623006ea0 Update 2fa code to layer 91 2018-12-24 14:10:15 +01:00
Lonami Exo
2aa089f29c Prevent KeyError in forward_messages 2018-12-20 20:33:25 +01:00
Kyle2142
d3feaeedb2 Prevent caption=None from crashing (#1071) 2018-12-20 10:50:16 +01:00
Lonami Exo
7100b75598 Update to layer 89
This breaks edit_2fa
2018-12-18 16:37:07 +01:00
Lonami Exo
09f994c105 Except TypeError on empty access hash from 5018879 thoroughly 2018-12-18 08:39:36 +01:00
Lonami Exo
5018879f84 Raise TypeError in get_input_peer if access_hash is None
When auto-casting to input peers if the access hash is now None,
the ID will be used to look-up a cached access hash which will
solve some common pitfalls (using full entities when only the
input variant should and could be used).
2018-12-15 12:23:14 +01:00
Lonami Exo
7ee7b43547 Be explicit that phone numbers only work if in your contacts 2018-12-15 12:04:36 +01:00
Sister Midnight
f3013c6817 Fix ConnectionHttp SSL socket wrap (#1064) 2018-12-10 14:43:48 +01:00
Lonami Exo
c48d41d99d Expect ConnectionError in the send loop 2018-12-06 16:27:09 +01:00
Lonami Exo
f9fc433c0f Better catch_up behaviour when invalid states are present 2018-12-06 16:07:11 +01:00
Lonami Exo
40730e7862 Fix aaee092 to correct entities' offsets on stripping 2018-12-06 12:33:15 +01:00
Lonami Exo
424079aa12 Fix pts initialized as -1 not being considered 2018-12-04 21:07:18 +01:00
Lonami Exo
0b89d9d3f9 Update to v1.4.3 2018-12-04 14:09:17 +01:00
Lonami Exo
4d8f078ad9 Fix _document_by_attribute calls using cond 2018-12-03 08:49:24 +01:00
Lonami Exo
ed1bcb509f Use InputMessageReplyTo in get_reply_message
This lets bots access to messages other bots sent through replies.
2018-11-29 14:21:49 +01:00