bugfixes
This commit is contained in:
parent
d68ccd84dc
commit
ec79c6d714
@ -26,7 +26,8 @@ class Exception extends \Exception
|
||||
if ($file !== null) {
|
||||
$this->file = $file;
|
||||
}
|
||||
\Rollbar\Rollbar::log($this);
|
||||
if (in_array($message, ['Re-executing query...', 'I had to recreate the temporary authorization key', 'This peer is not present in the internal peer database', "Couldn't get response"])) return;
|
||||
\Rollbar\Rollbar::log($this, debug_backtrace(), 'error');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -51,9 +51,16 @@ class RPCErrorException extends \Exception
|
||||
|
||||
}
|
||||
parent::__construct($message, $code, $previous);
|
||||
if (in_array($message, ['The provided username is not valid', 'The provided token is not valid'])) {
|
||||
if (in_array($this->rpc, ['CHANNEL_PRIVATE'])) {
|
||||
return;
|
||||
}
|
||||
\Rollbar\Rollbar::log($this);
|
||||
$additional = [];
|
||||
foreach (debug_backtrace() as $level) {
|
||||
if (isset($level['function']) && $level['function'] === 'method_call') {
|
||||
$additional = $level['args'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
\Rollbar\Rollbar::log($this, $additional, 'error');
|
||||
}
|
||||
}
|
||||
|
@ -309,7 +309,9 @@ trait TL
|
||||
$auto = false;
|
||||
|
||||
if ((!is_array($object) || (isset($object['_']) && $this->constructors->find_by_predicate($object['_'])['type'] !== $type['type'])) && in_array($type['type'], ['User', 'InputUser', 'Chat', 'InputChannel', 'Peer', 'InputPeer'])) {
|
||||
$object = $this->get_info($object)[$type['type']];
|
||||
$object = $this->get_info($object);
|
||||
if (!isset($object[$type['type']])) throw new \danog\MadelineProto\Exception("This peer is not present in the internal peer database");
|
||||
$object = $object[$type['type']];
|
||||
}
|
||||
if (!isset($object['_'])) {
|
||||
$constructorData = $this->constructors->find_by_predicate($type['type'], $layer);
|
||||
|
Loading…
Reference in New Issue
Block a user