From 6179e3a4ee7c306a3441440311b36b523cd3f0a7 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 30 Jan 2017 13:08:10 +0100 Subject: [PATCH] bugfixes --- src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php b/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php index 8d507b4d..03dcccc7 100644 --- a/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php @@ -62,10 +62,8 @@ trait AuthKeyHandler * *********************************************************************** * Find our key in the server_public_key_fingerprints vector */ - if (!isset($this->key->keydata)) { - // Load rsa key - \danog\MadelineProto\Logger::log(['Loading RSA key...'], Logger::ULTRA_VERBOSE); - $this->key = new RSA($this->settings['authorization']['rsa_key']); + if (!isset($this->key->keydata['fp'])) { + $this->key = new \danog\MadelineProto\RSA($this->settings['authorization']['rsa_key']); } foreach ($ResPQ['server_public_key_fingerprints'] as $curfp) { if ($this->key->keydata['fp'] === $curfp) {