Provide size in secret chat files

This commit is contained in:
Daniil Gentili 2020-10-19 19:55:36 +02:00
parent dc165eb30a
commit fb20b2d213
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 4 additions and 0 deletions

View File

@ -407,6 +407,9 @@ class Connection
if (isset($arguments['file']['iv'])) { if (isset($arguments['file']['iv'])) {
$arguments['message']['media']['iv'] = $arguments['file']['iv']; $arguments['message']['media']['iv'] = $arguments['file']['iv'];
} }
if (isset($arguments['file']['size'])) {
$arguments['message']['media']['size'] = $arguments['file']['size'];
}
} }
$arguments['queuePromise'] = new Deferred; $arguments['queuePromise'] = new Deferred;
return $arguments['queuePromise']; return $arguments['queuePromise'];

View File

@ -222,6 +222,7 @@ trait Files
$constructor['key_fingerprint'] = $fingerprint; $constructor['key_fingerprint'] = $fingerprint;
$constructor['key'] = $key; $constructor['key'] = $key;
$constructor['iv'] = $iv; $constructor['iv'] = $iv;
$constructor['size'] = $size;
} }
$constructor['md5_checksum'] = ''; $constructor['md5_checksum'] = '';
//\hash_final($ctx); //\hash_final($ctx);