1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 07:34:41 +01:00
This commit is contained in:
Daniil Gentili 2017-07-31 17:08:14 +00:00
parent 13edc2e289
commit cbf9d99ec2
2 changed files with 2 additions and 1 deletions

View File

@ -65,6 +65,7 @@ class RPCErrorException extends \Exception
case 'PEER_ID_INVALID': $message = 'The provided peer id is invalid'; break;
case 'CHAT_ID_INVALID': $message = 'The provided chat id is invalid'; break;
case 'MESSAGE_DELETE_FORBIDDEN': $message = "You can't delete one of the messages you tried to delete, most likely because it is a service message."; break;
case 'CHAT_ADMIN_REQUIRED': $message = 'You must be an admin in this chat to do this'; break;
case -429: $message = 'Too many requests'; break;
}
parent::__construct($message, $code, $previous);

View File

@ -87,7 +87,7 @@ trait AuthKeyHandler
}
if ($e->rpc === 'CALL_ALREADY_DECLINED') {
\danog\MadelineProto\Logger::log(['Call '.$call['id'].' already declined']);
$this->calls[$res['phone_call']['id']]->discard();
$this->calls[$call['id']]->discard();
return false;
}
throw $e;