Fixes I guess
This commit is contained in:
parent
e4a3fc9484
commit
5cc6719c3d
@ -301,6 +301,7 @@ trait Files
|
|||||||
}
|
}
|
||||||
if ($res['_'] === 'upload.fileCdnRedirect') {
|
if ($res['_'] === 'upload.fileCdnRedirect') {
|
||||||
$cdn = true;
|
$cdn = true;
|
||||||
|
$this->get_config([], ['datacenter' => $this->datacenter->curdc]);
|
||||||
$message_media['file_token'] = $res['file_token'];
|
$message_media['file_token'] = $res['file_token'];
|
||||||
$message_media['cdn_key'] = $res['encryption_key'];
|
$message_media['cdn_key'] = $res['encryption_key'];
|
||||||
$message_media['cdn_iv'] = $res['encryption_iv'];
|
$message_media['cdn_iv'] = $res['encryption_iv'];
|
||||||
@ -311,6 +312,7 @@ trait Files
|
|||||||
}
|
}
|
||||||
if ($res['_'] === 'upload.cdnFileReuploadNeeded') {
|
if ($res['_'] === 'upload.cdnFileReuploadNeeded') {
|
||||||
\danog\MadelineProto\Logger::log(['File is not stored on CDN, requesting reupload!'], \danog\MadelineProto\Logger::NOTICE);
|
\danog\MadelineProto\Logger::log(['File is not stored on CDN, requesting reupload!'], \danog\MadelineProto\Logger::NOTICE);
|
||||||
|
$this->get_config([], ['datacenter' => $this->datacenter->curdc]);
|
||||||
try {
|
try {
|
||||||
$this->add_cdn_hashes($message_media['file_token'], $this->method_call('upload.reuploadCdnFile', ['file_token' => $message_media['file_token'], 'request_token' => $res['request_token']], ['heavy' => true, 'datacenter' => $old_dc]));
|
$this->add_cdn_hashes($message_media['file_token'], $this->method_call('upload.reuploadCdnFile', ['file_token' => $message_media['file_token'], 'request_token' => $res['request_token']], ['heavy' => true, 'datacenter' => $old_dc]));
|
||||||
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user