Array it is then
This commit is contained in:
parent
ac32bb6bc6
commit
23d2b718a3
@ -452,9 +452,8 @@ trait PeerHandler
|
|||||||
if (!isset($res['participants']) && isset($res['can_view_participants']) && $res['can_view_participants']) {
|
if (!isset($res['participants']) && isset($res['can_view_participants']) && $res['can_view_participants']) {
|
||||||
$res['participants'] = [];
|
$res['participants'] = [];
|
||||||
$limit = 200;
|
$limit = 200;
|
||||||
$filters = ['channelParticipantsBanned', 'channelParticipantsAdmins', 'channelParticipantsKicked', 'channelParticipantsBots', 'channelParticipantsRecent'];
|
$filters = ['channelParticipantsRecent', 'channelParticipantsAdmins', 'channelParticipantsKicked', 'channelParticipantsBots', 'channelParticipantsBanned'];
|
||||||
while (count($filters)) {
|
foreach ($filters as $filter) {
|
||||||
$filter = array_pop($filters);
|
|
||||||
$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], ['datacenter' => $this->datacenter->curdc]);
|
||||||
@ -519,6 +518,7 @@ trait PeerHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$res['participants'] = array_values($res['participants']);
|
||||||
}
|
}
|
||||||
if ($fullfetch || $send) {
|
if ($fullfetch || $send) {
|
||||||
$this->store_db($res);
|
$this->store_db($res);
|
||||||
|
Loading…
Reference in New Issue
Block a user