1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 19:04:40 +01:00

Improve update message

This commit is contained in:
Daniil Gentili 2023-11-27 15:32:24 +01:00
parent 8b02bc5d4d
commit 4398225c4b
3 changed files with 7 additions and 3 deletions

2
docs

@ -1 +1 @@
Subproject commit 1e38683e7f0464c86cb5084c360dc1753b28d130
Subproject commit d824948d8a8c38446bb322dc73b6dcb86e59d3c4

View File

@ -117,7 +117,7 @@
"long_not_64": "Given value is not 64 bytes long",
"array_invalid": "You didn't provide a valid array",
"predicate_not_set": "Predicate (value under _) was not set!",
"update_madelineproto": "You're running an old version of MadelineProto, an update is required!",
"update_madelineproto": "You're running an old version of MadelineProto, an update is required: currently running %s, but the latest version with multiple bugfixes and new features is %s!",
"type_extract_error": "Could not extract type \"%s\", you should update MadelineProto!",
"method_not_found": "Could not find method: ",
"params_missing": "Missing required parameter",

View File

@ -1523,7 +1523,11 @@ final class MTProto implements TLCallback, LoggerGetter, SettingsGetter
Magic::start(light: false);
$warning = '';
if (API::RELEASE !== Magic::$latest_release) {
$warning .= "<h2 style='color:red;'>".htmlentities(Lang::$current_lang['update_madelineproto']).'</h2>';
$warning .= "<h2 style='color:red;'>".htmlentities(sprintf(
Lang::$current_lang['update_madelineproto'],
API::RELEASE,
Magic::$latest_release ?? 'error',
)).'</h2>';
}
if (!Magic::$hasOpenssl) {
$warning .= "<h2 style='color:red;'>".htmlentities(sprintf(Lang::$current_lang['extensionRecommended'], 'openssl'))."</h2>";