Commit Graph

124 Commits

Author SHA1 Message Date
Daniil Gentili
7be648fb20 Added documentation, simplified code, organized exceptions, added some more examples in testing.php, decided to unset flags in deserialized responses, moved message id arrays to Connection classes, added wrappers for logging in to telegram as a bot or as a user and for logging out, fixed deserializing of gzip packed objects, added more logging, fixed bugs, added methods to get and parse configuration, saved some fairies, fixed exporting/importing of authorization, added some wakeup methods to prevent problems during serialization, added support for ipv6 and automagical detection too. I think we can safely say this is now a beta. 2016-11-24 23:15:22 +00:00
Daniil Gentili
c168890384 Fixed bugs, improved exception erro rhandling, blah, blah, blah (#RTFC) 2016-11-24 12:16:06 +00:00
Daniil Gentili
87e625ea9c Applied fixes from StyleCI 2016-11-23 20:04:51 +00:00
Daniil Gentili
109c887337 Fixed computation of flags, improved serialization, written basic authorization flow in testing.php (closes #21 and #22) 2016-11-23 20:04:29 +00:00
danogentili
d7c098087e Trying to fix flags 2016-11-23 15:58:38 +03:00
Daniil Gentili
0767d1bc80 Updated to layer 57 and added logging 2016-11-22 16:37:48 +00:00
Daniil Gentili
dee7302341 Updated to layer 57 2016-11-22 16:22:30 +00:00
Daniil Gentili
0db89eaeb1 Trying to fix serialization of flags... 2016-11-22 12:13:29 +00:00
Daniil Gentili
17f0de5e73 Write client info after binding keys 2016-11-18 21:27:58 +00:00
Daniil Gentili
c39c6a8511 Applied fixes from StyleCI 2016-11-18 20:50:38 +00:00
Daniil Gentili
545b5629f6 Fixed bugs 2016-11-18 20:50:19 +00:00
Daniil Gentili
83e9ff8de9 Applied fixes from StyleCI 2016-11-17 17:44:04 +00:00
danogentili
82dc195483 Fixed bugs 2016-11-17 20:43:52 +03:00
Daniil Gentili
b18c16aedc Applied fixes from StyleCI 2016-11-17 14:26:20 +00:00
danogentili
ddf5bc7050 Fixed crc32 2016-11-17 17:25:26 +03:00
danogentili
c307357ebf BTW I'm doing this offline 2016-11-17 14:52:33 +03:00
danogentili
5a22fd0665 pony 2016-11-17 14:32:56 +03:00
danogentili
7552ba13c7 Fixed crc32 2016-11-17 14:07:29 +03:00
danogentili
b0c7c79d3a Removed useless __destruct methods 2016-11-17 14:02:22 +03:00
danogentili
a35812c5f1 Store future salts in class variable 2016-11-17 13:56:11 +03:00
danogentili
947a1a973f Cleaned up TL class, cleaned up API and APIFactory class, fixed bugs in the DataCenter class, fixed getting and setting of time deltas. 2016-11-17 13:49:32 +03:00
danogentili
caa05510a0 Cleaned up RSA class 2016-11-16 18:11:50 +03:00
danogentili
e6093e65ac Fixed APIFactory, allowed reading of settings from the API class, changed the way of passing arguments to methods with the API (and APIFactory) class. 2016-11-16 17:37:27 +03:00
danogentili
b28aab6359 Fixed typo in the license warning 2016-11-16 17:18:35 +03:00
danogentili
f78ead188a I do love logging 2016-11-16 17:10:06 +03:00
danogentili
1ded657739 Added APIFactory for calling namespaced mtproto methods, cleaned up testing.php and API.php, moved authorization keys, session_id, seq_no and time delta to the Connection class, added close_and_reopen method to the Connection class, improved DataCenter class, renamed Logging class to Logger, added a bit more logging, added setup_logger, switch_dc, init_authorization methods to the MTProto class, added parameter to disable automatic switching to nearest DC in write_client_info, added a try catch block in the create_auth_key method, fixed switching of DCs in wait_for_response method, added arguments check in the method calling methods, added a message id check in MessageHandler, added method_name_namespaced array in TL for APIFactory, renamed a lot of stuff and removed a few checks in the TL class, moved sendCode test call to testing.php 2016-11-16 17:05:27 +03:00
Daniil Gentili
49a555d99f Applied fixes from StyleCI 2016-11-15 20:43:20 +00:00
danogentili
417d9343c2 Fixed binding of authorization keys. Finally can use auth.sendCode method. 2016-11-15 23:42:52 +03:00
danogentili
6720199a33 Added error descriptions 2016-11-15 16:31:32 +03:00
Daniil Gentili
84d25bfaa2 Applied fixes from StyleCI 2016-11-15 12:46:25 +00:00
danogentili
67de600bb8 Removed useless dependencies, made logging class static, made access to the PHPStruct class static, added default_dc setting in the settings array 2016-11-15 15:39:42 +03:00
Daniil Gentili
37fa11e81a uhh 2016-10-18 17:11:33 +00:00
Daniil Gentili
9a11d42657 Applied fixes from StyleCI 2016-10-18 16:46:55 +00:00
Daniil Gentili
7b468c9d0d Fixed serialization of vectors, written bind_temp_auth_key function 2016-10-18 16:46:31 +00:00
Daniil Gentili
d1e7cce35b Trying to make sendCode work 2016-10-18 14:44:44 +00:00
Daniil Gentili
2badf3f35e Applied fixes from StyleCI 2016-10-18 13:43:24 +00:00
Daniil Gentili
6c94e2426a TL now uses an istantiated version of PHPStruct, TLConstructor and TLMethod now decode vectors and optional params 2016-10-18 13:42:14 +00:00
Daniil Gentili
737c4e286b Applied fixes from StyleCI 2016-10-14 15:16:38 +00:00
danogentili
f3f7772f6e Fixed serialization of arrays 2016-10-14 17:16:23 +02:00
Daniil Gentili
e7da05e617 Throw exception when trying to serialize unknown types 2016-10-14 12:29:03 +02:00
Daniil Gentili
6798e2f4c1 Applied fixes from StyleCI 2016-10-13 22:49:54 +00:00
danogentili
028cadc349 First step to initConnection 2016-10-14 00:49:43 +02:00
Daniil Gentili
55e3905495 Applied fixes from StyleCI 2016-10-13 21:22:32 +00:00
danogentili
0459498eb8 Fixed handling of certain responses when named params aren't used and beautified logging 2016-10-13 23:22:11 +02:00
Daniil Gentili
aed44236d1 Applied fixes from StyleCI 2016-10-11 15:30:11 +00:00
Daniil Gentili
a540b0a4cf Improved logging, extended the tools class instead of calling its methods statically, improved generation and checking of message ids 2016-10-11 17:29:47 +02:00
danogentili
528faf16b0 Improved logging 2016-10-11 00:19:39 +02:00
Daniil Gentili
40d6deaa13 Applied fixes from StyleCI 2016-10-10 22:05:43 +00:00
danogentili
669e1d8a02 Made the prime module work natively (closes #6) thanks to https://github.com/LonamiWebs/Telethon/blob/master/telethon/crypto/factorizator.py 2016-10-11 00:05:28 +02:00
danogentili
e4bf3fcc32 Merge branch 'master' of https://github.com/danog/MadelineProto 2016-10-09 19:47:28 +02:00