getMedia fix

This commit is contained in:
Alexander Pankratov 2019-07-23 01:08:36 +03:00
parent 79721ac20a
commit ac4be8e750

View File

@ -371,9 +371,12 @@ class Client
if (!$data['message']) {
$peerInfo = yield $this->MadelineProto->getInfo($data['peer']);
if ($peerInfo['type'] === 'channel') {
$response = yield $this->MadelineProto->channels->getMessages($data);
$response = yield $this->MadelineProto->channels->getMessages([
'channel' => $data['peer'],
'id' => $data['id'],
]);
} else {
$response = yield $this->MadelineProto->messages->getMessages($data);
$response = yield $this->MadelineProto->messages->getMessages(['id' => $data['id']]);
}
$message = $response['messages'][0];