This commit is contained in:
Daniil Gentili 2020-10-19 18:49:46 +02:00
commit 34d46ea717
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -396,7 +396,7 @@ class Connection
if (isset($arguments['message']['reply_to_msg_id'])) {
$arguments['message']['reply_to_random_id'] = $arguments['message']['reply_to_msg_id'];
}
} elseif ($method === 'messages.sendEncryptedFile') {
} elseif ($method === 'messages.sendEncryptedFile' || $method === 'messages.uploadEncryptedFile') {
if (isset($arguments['file'])) {
if ((!\is_array($arguments['file']) || !(isset($arguments['file']['_']) && $this->API->getTL()->getConstructors()->findByPredicate($arguments['file']['_']) === 'InputEncryptedFile')) && $this->API->getSettings()->getFiles()->getAllowAutomaticUpload()) {
$arguments['file'] = (yield from $this->API->uploadEncrypted($arguments['file']));