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['message']['_'] = 'decryptedMessage';
$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 (isset($arguments['file'])) {
@ -503,7 +506,7 @@ trait TL
$serialized .= pack('@4');
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'];
continue;
}