This commit is contained in:
Daniil Gentili 2019-12-25 21:11:38 +01:00
parent b44e23cee8
commit 0bcef40328
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -641,7 +641,7 @@ class TL
!\is_array($arguments['file']) || !\is_array($arguments['file']) ||
!(isset($arguments['file']['_']) && $this->constructors->findByPredicate($arguments['file']['_']) === 'InputEncryptedFile') !(isset($arguments['file']['_']) && $this->constructors->findByPredicate($arguments['file']['_']) === 'InputEncryptedFile')
) && ) &&
$this->settings['upload']['allow_automatic_upload'] $this->API->settings['upload']['allow_automatic_upload']
) { ) {
$arguments['file'] = yield $this->API->uploadEncrypted($arguments['file']); $arguments['file'] = yield $this->API->uploadEncrypted($arguments['file']);
} }
@ -819,7 +819,7 @@ class TL
&& $this->constructors->findByPredicate($arguments[$current_argument['name']]['_']) === 'InputFile' && $this->constructors->findByPredicate($arguments[$current_argument['name']]['_']) === 'InputFile'
) )
) )
&& $this->settings['upload']['allow_automatic_upload'] && $this->API->settings['upload']['allow_automatic_upload']
) { ) {
$arguments[$current_argument['name']] = yield $this->API->upload($arguments[$current_argument['name']]); $arguments[$current_argument['name']] = yield $this->API->upload($arguments[$current_argument['name']]);
} }