Made small fixes to TL
This commit is contained in:
parent
546d7cc46e
commit
1d9ea6ad0c
@ -233,6 +233,7 @@ src/danog/MadelineProto/
|
||||
TL - Handles TL serialization and deserialization
|
||||
TLConstructor - Stores TL constructors
|
||||
TLMethod - Stores TL methods
|
||||
TLParams - Parses params
|
||||
API - Wrapper class that instantiates the MTProto class, sets the error handler, provides a wrapper for calling mtproto methods directly as class submethods, and provides some simplified wrappers for logging in to telegram
|
||||
APIFactory - Provides a wrapper for calling namespaced mtproto methods directly as class submethods
|
||||
Connection - Handles tcp/udp/http connections and wrapping payloads generated by MTProtoTools/MessageHandler into the right message according to the protocol, stores authorization keys, session id and sequence number
|
||||
|
@ -21,8 +21,9 @@ class TLParams
|
||||
$param['subtype'] = null;
|
||||
if (preg_match('/^flags\.\d*\?/', $param['type'])) {
|
||||
$param['flag'] = true;
|
||||
$param['pow'] = pow(2, preg_replace(['/^flags\./', '/\?.*/'], '', $param['type']));
|
||||
$param['type'] = preg_replace('/^flags\.\d*\?/', '', $param['type']);
|
||||
$flag = explode('?', explode('.', $param['type'])[1]);
|
||||
$param['pow'] = pow(2, $flag[0]);
|
||||
$param['type'] = $flag[1];
|
||||
}
|
||||
if (preg_match('/vector<.*>/i', $param['type'])) {
|
||||
if (preg_match('/vector/', $param['type'])) {
|
||||
|
Loading…
Reference in New Issue
Block a user