Added support for layer 72 (#209)
* Update to layer 72 (no docs yet) * added fields hidden_prehistory and available_min_id for full channels in get_pwr_chat
This commit is contained in:
parent
7c205811ff
commit
a477ad61d4
@ -393,7 +393,7 @@ trait PeerHandler
|
|||||||
$res[$key] = $full['Chat'][$key];
|
$res[$key] = $full['Chat'][$key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (['can_set_stickers', 'stickerset', 'can_view_participants', 'can_set_username', 'participants_count', 'admins_count', 'kicked_count', 'banned_count', 'migrated_from_chat_id', 'migrated_from_max_id', 'pinned_msg_id', 'about'] as $key) {
|
foreach (['can_set_stickers', 'stickerset', 'can_view_participants', 'can_set_username', 'participants_count', 'admins_count', 'kicked_count', 'banned_count', 'migrated_from_chat_id', 'migrated_from_max_id', 'pinned_msg_id', 'about', 'hidden_prehistory', 'available_min_id'] as $key) {
|
||||||
if (isset($full['full'][$key])) {
|
if (isset($full['full'][$key])) {
|
||||||
$res[$key] = $full['full'][$key];
|
$res[$key] = $full['full'][$key];
|
||||||
}
|
}
|
||||||
@ -462,7 +462,7 @@ trait PeerHandler
|
|||||||
$offset = -$limit;
|
$offset = -$limit;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$gres = $this->method_call('channels.getParticipants', ['channel' => $full['InputChannel'], 'filter' => ['_' => $filter, 'q' => ''], 'offset' => $offset += $limit, 'limit' => $limit], ['datacenter' => $this->datacenter->curdc]);
|
$gres = $this->method_call('channels.getParticipants', ['channel' => $full['InputChannel'], 'filter' => ['_' => $filter, 'q' => ''], 'offset' => $offset += $limit, 'limit' => $limit, 'hash' => 0], ['datacenter' => $this->datacenter->curdc]);
|
||||||
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||||
if ($e->rpc === 'CHAT_ADMIN_REQUIRED') {
|
if ($e->rpc === 'CHAT_ADMIN_REQUIRED') {
|
||||||
continue;
|
continue;
|
||||||
@ -517,7 +517,7 @@ trait PeerHandler
|
|||||||
}
|
}
|
||||||
$res['participants'][$participant['user_id']] = $newres;
|
$res['participants'][$participant['user_id']] = $newres;
|
||||||
}
|
}
|
||||||
$gres = $this->method_call('channels.getParticipants', ['channel' => $full['InputChannel'], 'filter' => ['_' => $filter, 'q' => ''], 'offset' => $offset += $limit, 'limit' => $limit], ['datacenter' => $this->datacenter->curdc]);
|
$gres = $this->method_call('channels.getParticipants', ['channel' => $full['InputChannel'], 'filter' => ['_' => $filter, 'q' => ''], 'offset' => $offset += $limit, 'limit' => $limit, 'hash' => 0], ['datacenter' => $this->datacenter->curdc]);
|
||||||
|
|
||||||
if (empty($gres['participants'])) {
|
if (empty($gres['participants'])) {
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user