Update RPCErrorException.php

This commit is contained in:
Daniil Gentili 2017-07-28 22:51:35 +02:00 committed by GitHub
parent a195f57e77
commit 3024dc4a15

View File

@ -69,7 +69,7 @@ class RPCErrorException extends \Exception
}
parent::__construct($message, $code, $previous);
$this->prettify_tl();
if (in_array($this->rpc, ['CHANNEL_PRIVATE', -404, -429, 'USERNAME_NOT_OCCUPIED', 'ACCESS_TOKEN_INVALID', 'AUTH_KEY_UNREGISTERED', 'SESSION_PASSWORD_NEEDED', 'PHONE_NUMBER_UNOCCUPIED', 'PEER_ID_INVALID', 'CHAT_ID_INVALID', 'USERNAME_INVALID', 'CHAT_WRITE_FORBIDDEN'])) {
if (in_array($this->rpc, ['CHANNEL_PRIVATE', -404, -429, 'USERNAME_NOT_OCCUPIED', 'ACCESS_TOKEN_INVALID', 'AUTH_KEY_UNREGISTERED', 'SESSION_PASSWORD_NEEDED', 'PHONE_NUMBER_UNOCCUPIED', 'PEER_ID_INVALID', 'CHAT_ID_INVALID', 'USERNAME_INVALID', 'CHAT_WRITE_FORBIDDEN', 'CHAT_ADMIN_REQUIRED'])) {
return;
}
if (strpos($this->rpc, 'FLOOD_WAIT_') !== false) {