1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 12:31:15 +01:00
This commit is contained in:
Daniil Gentili 2023-04-23 21:27:53 +02:00
parent 142293faa6
commit d0fa8311b5

View File

@ -773,7 +773,7 @@ final class MTProto implements TLCallback, LoggerGetter
foreach ($chat['usernames'] ?? [] as ['username' => $username]) {
$promises []= async($this->usernames->set(...), \strtolower($username), $id);
}
if (\count($promises) % 500 === 0) {
if (\count($promises) >= 500) {
await($promises);
$promises = [];
}