diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index 330f54c3..f60e26db 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -652,6 +652,10 @@ class TL } elseif (isset($arguments['id'])) { $method = 'photos.updateProfilePhoto'; } + } else if ($method === 'messages.uploadMedia') { + if (!isset($arguments['peer']) && !$this->API->getSelf()['bot']) { + $arguments['peer'] = 'me'; + } } $tl = $this->methods->findByMethod($method); if ($tl === false) {