Skip to content

Commit

Permalink
getMedia fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrime-ru committed Jul 22, 2019
1 parent 79721ac commit ac4be8e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,12 @@ function() use ($data) {
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];
Expand Down

0 comments on commit ac4be8e

Please sign in to comment.