Final fixes

This commit is contained in:
Daniil Gentili 2020-02-12 18:36:11 +01:00
parent 4289661094
commit 23d27e4d47
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -37,6 +37,7 @@ use Amp\Promise;
use Amp\Success; use Amp\Success;
use danog\MadelineProto\Exception; use danog\MadelineProto\Exception;
use danog\MadelineProto\FileCallbackInterface; use danog\MadelineProto\FileCallbackInterface;
use danog\MadelineProto\MTProto;
use danog\MadelineProto\Stream\Common\BufferedRawStream; use danog\MadelineProto\Stream\Common\BufferedRawStream;
use danog\MadelineProto\Stream\Common\SimpleBufferedRawStream; use danog\MadelineProto\Stream\Common\SimpleBufferedRawStream;
use danog\MadelineProto\Stream\ConnectionContext; use danog\MadelineProto\Stream\ConnectionContext;
@ -949,11 +950,12 @@ trait Files
*/ */
private static function getExplanation(int $code): string private static function getExplanation(int $code): string
{ {
$body = "<html><body><h1>$code ${Status::getReason($code)}</h1><br>"; $reason = Status::getReason($code);
$body = "<html><body><h1>$code $reason</h1><br>";
if ($code === Status::RANGE_NOT_SATISFIABLE) { if ($code === Status::RANGE_NOT_SATISFIABLE) {
$body .= "<p>Could not use selected range.</p>"; $body .= "<p>Could not use selected range.</p>";
} }
$body .= self::POWERED_BY; $body .= MTProto::POWERED_BY;
$body .= "</body></html>"; $body .= "</body></html>";
return $body; return $body;
} }