From bb9804290b531b95f79c3e9501a298391d0f0acb Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 10 Nov 2019 19:31:11 +0100 Subject: [PATCH] CDN bugfix --- src/danog/MadelineProto/MTProto.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 34fd2897..04218232 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -1626,7 +1626,8 @@ class MTProto extends AsyncConstruct implements TLCallback { try { foreach ((yield $this->methodCallAsyncRead('help.getCdnConfig', [], ['datacenter' => $datacenter]))['public_keys'] as $curkey) { - $this->cdn_rsa_keys[$tempkey->fp] = yield (new RSA)->load($this->TL, $curkey['public_key']); + $curkey = yield (new RSA)->load($this->TL, $curkey['public_key']); + $this->cdn_rsa_keys[$curkey->fp] = $curkey; } } catch (\danog\MadelineProto\TL\Exception $e) { $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::FATAL_ERROR);