mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 03:34:42 +01:00
Throw USERNAME_INVALID errors
This commit is contained in:
parent
52231d47ee
commit
209dde1a89
@ -750,7 +750,7 @@ 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 || $e->rpc === 'AUTH_KEY_UNREGISTERED') {
|
||||
if (strpos($e->rpc, 'FLOOD_WAIT_') === 0 || $e->rpc === 'AUTH_KEY_UNREGISTERED' || $e->rpc === 'USERNAME_INVALID') {
|
||||
throw $e;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user