1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 21:14:43 +01:00

Improve messages

This commit is contained in:
Daniil Gentili 2023-07-19 16:40:35 +02:00
parent 9785ab2d5b
commit 2cb86c2ef1
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 8 additions and 2 deletions

View File

@ -150,6 +150,8 @@
"dl.php_powered_by_madelineproto": "Telegram file download server (up to 4GB), powered by <a href=\"https://docs.madelineproto.xyz\" target=\"_blank\">MadelineProto</a>!<br>Click <a href=\"https://docs.madelineproto.xyz/docs/FILES.html#getting-a-download-link\" target=\"_blank\">here</a> for more info on how to setup your very own Telegram file download server!",
"dl.php_check_logs_make_sure_session_running": "The EventHandler bot or the IPC server is offline, please check logs and make sure it is running!",
"account_banned": "!!!!!!! WARNING !!!!!!!\nTelegram's flood prevention system suspended this account.\nTo continue, manual verification is required.\nSend an email to recover@telegram.org, asking to unban the phone number %s, and shortly describe what will you do with this phone number.\nThen login again.\nIf you intentionally deleted this account, ignore this message.",
"plugin_path_does_not_exist": "Plugin path %s does not exist!"

View File

@ -161,11 +161,15 @@ final class ResponseInfo
public function getCodeExplanation(): string
{
$reason = HttpStatus::getReason($this->code);
$body = "<html lang='en'><body><h1>{$this->code} $reason</h1><br>";
$body = "<html lang='en'><body><h1>{$this->code} $reason</h1>";
if ($this->code === HttpStatus::RANGE_NOT_SATISFIABLE) {
$body .= '<p>Could not use selected range.</p>';
}
if ($this->code === HttpStatus::BAD_GATEWAY) {
$body .= '<small>'.Lang::$current_lang["dl.php_check_logs_make_sure_session_running"].'</small>';
} else {
$body .= '<small>'.Lang::$current_lang["dl.php_powered_by_madelineproto"].'</small>';
}
$body .= '</body></html>';
return $body;
}