Fixes
This commit is contained in:
parent
420e71bfbc
commit
837f670fa5
@ -71,12 +71,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', 'CHAT_ADMIN_REQUIRED', 'PEER_FLOOD'])) {
|
||||
return;
|
||||
}
|
||||
if (strpos($this->rpc, 'FLOOD_WAIT_') !== false) {
|
||||
return;
|
||||
}
|
||||
|
||||
$additional = [];
|
||||
foreach ($this->getTrace() as $level) {
|
||||
if (isset($level['function']) && $level['function'] === 'method_call') {
|
||||
@ -86,6 +81,15 @@ class RPCErrorException extends \Exception
|
||||
break;
|
||||
}
|
||||
}
|
||||
file_get_contents('https://rpc.pwrtelegram.xyz/?method='.$additional[0].'&code='.$code.'&error='.$this->rpc);
|
||||
/*
|
||||
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', 'PEER_FLOOD'])) {
|
||||
return;
|
||||
}
|
||||
if (strpos($this->rpc, 'FLOOD_WAIT_') !== false) {
|
||||
return;
|
||||
}
|
||||
$message === 'Telegram is having internal issues, please try again later.' ? \Rollbar\Rollbar::log(\Rollbar\Payload\Level::critical(), $message) : \Rollbar\Rollbar::log(\Rollbar\Payload\Level::error(), $this, $additional);
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user