1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 04:08:59 +01:00

Fix getPwrChat

This commit is contained in:
Daniil Gentili 2023-02-14 19:48:03 +01:00
parent c9a1df59f8
commit b69b1f7ce0
2 changed files with 6 additions and 3 deletions

View File

@ -22,7 +22,7 @@
"krakjoe/pthreads-polyfill": "*",
"ext-pthreads": "*"
},
"minimum-stability": "dev",
"minimum-stability": "beta",
"require": {
"php-64bit": ">=8.1",
"danog/primemodule": "^1",

View File

@ -1077,12 +1077,15 @@ trait PeerHandler
if (!($this->fetchParticipants($channel, $filter, $q, $total_count, $res))) {
return [];
}
++$depth;
$promises = [];
for ($x = 'a'; $x !== 'aa' && $total_count > \count($res['participants']); $x++) {
$promises []= async($this->recurseAlphabetSearchParticipants(...), $channel, $filter, $q.$x, $total_count, $res, $depth + 1);
$promises []= async(function () use ($channel, $filter, $q, $x, $total_count, &$res, $depth) {
$this->recurseAlphabetSearchParticipants($channel, $filter, $q.$x, $total_count, $res, $depth);
});
}
if ($depth > 2) {
if ($depth > 3) {
return $promises;
}