Throw flood waits in resolve_username
This commit is contained in:
parent
214471bc60
commit
af8443caf2
@ -750,7 +750,9 @@ trait PeerHandler
|
||||
$res = $this->method_call('contacts.resolveUsername', ['username' => str_replace('@', '', $username)], ['datacenter' => $this->datacenter->curdc]);
|
||||
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||
\danog\MadelineProto\Logger::log('Username resolution failed with error '.$e->getMessage(), \danog\MadelineProto\Logger::ERROR);
|
||||
|
||||
if (strpos($e->rpc, 'FLOOD_WAIT_') === 0) {
|
||||
throw $e;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if ($res['_'] === 'contacts.resolvedPeer') {
|
||||
|
Loading…
Reference in New Issue
Block a user