mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-11-30 04:19:13 +01:00
getMedia fix
This commit is contained in:
parent
79721ac20a
commit
ac4be8e750
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user