mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-22 14:31:13 +01:00
Fix
This commit is contained in:
parent
142293faa6
commit
d0fa8311b5
@ -773,7 +773,7 @@ final class MTProto implements TLCallback, LoggerGetter
|
|||||||
foreach ($chat['usernames'] ?? [] as ['username' => $username]) {
|
foreach ($chat['usernames'] ?? [] as ['username' => $username]) {
|
||||||
$promises []= async($this->usernames->set(...), \strtolower($username), $id);
|
$promises []= async($this->usernames->set(...), \strtolower($username), $id);
|
||||||
}
|
}
|
||||||
if (\count($promises) % 500 === 0) {
|
if (\count($promises) >= 500) {
|
||||||
await($promises);
|
await($promises);
|
||||||
$promises = [];
|
$promises = [];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user