1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 15:34:57 +01:00

TL bugfixes

This commit is contained in:
Daniil Gentili 2018-07-17 16:07:46 +02:00
parent 90896a46df
commit f1b6802676
2 changed files with 5 additions and 2 deletions

2
docs

@ -1 +1 @@
Subproject commit 1c204d1dbdaea25559ac9a89d51c8850e005b772 Subproject commit 1554397b68a694790fca5493abf480457e016ab4

View File

@ -412,6 +412,9 @@ trait TL
$arguments = ['peer' => $arguments['peer'], 'message' => $arguments]; $arguments = ['peer' => $arguments['peer'], 'message' => $arguments];
$arguments['message']['_'] = 'decryptedMessage'; $arguments['message']['_'] = 'decryptedMessage';
$arguments['message']['ttl'] = 0; $arguments['message']['ttl'] = 0;
if (isset($arguments['message']['reply_to_msg_id'])) {
$arguments['message']['reply_to_random_id'] = $arguments['message']['reply_to_msg_id'];
}
} }
if ($method === 'messages.sendEncryptedFile') { if ($method === 'messages.sendEncryptedFile') {
if (isset($arguments['file'])) { if (isset($arguments['file'])) {
@ -503,7 +506,7 @@ trait TL
$serialized .= pack('@4'); $serialized .= pack('@4');
continue; continue;
} }
if ($id = $this->constructors->find_by_predicate(lcfirst($current_argument['type']).'Empty')) { if ($id = $this->constructors->find_by_predicate(lcfirst($current_argument['type']).'Empty', isset($tl['layer']) ? $tl['layer'] : -1)) {
$serialized .= $id['id']; $serialized .= $id['id'];
continue; continue;
} }