1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 08:34:41 +01:00
This commit is contained in:
Daniil Gentili 2017-04-11 10:32:51 +02:00
commit 227273204a

View File

@ -34,7 +34,9 @@ trait CallHandler
}
if (isset($args['chat_id']) && $method !== 'messages.discardEncryption' && (is_object($args['chat_id']) || $args['chat_id'] < 0)) {
$res = $this->get_info($args['chat_id']);
if ($res['type'] !== 'chat') throw new \danog\MadelineProto\Exception('chat_id is not a chat id!');
if ($res['type'] !== 'chat') {
throw new \danog\MadelineProto\Exception('chat_id is not a chat id!');
}
$args['chat_id'] = $res['chat_id'];
}
$serialized = $this->serialize_method($method, $args);