From a4a7a77abd33918a9626c46c4bbc4346a950bb4c Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 28 Feb 2017 19:08:30 +0300 Subject: [PATCH] Closed beta 1000017001: enable auth_key_destroy. Now we use only new authorization keys for signing in. If we are preparing to sign in and we see, that some of the authorization keys were not generated in this launch, but were read from file, we destroy all existing auth keys and generate a completely new set. --- Telegram/Resources/uwp/AppX/AppxManifest.xml | 2 +- Telegram/Resources/winrc/Telegram.rc | 8 ++++---- Telegram/Resources/winrc/Updater.rc | 8 ++++---- Telegram/SourceFiles/core/version.h | 4 ++-- Telegram/SourceFiles/messenger.cpp | 2 +- Telegram/build/version | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml index 30a22ad8a..0c090148d 100644 --- a/Telegram/Resources/uwp/AppX/AppxManifest.xml +++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml @@ -9,7 +9,7 @@ + Version="1.0.17.1" /> Telegram Desktop Telegram Messenger LLP diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index ff58b7f93..200819f67 100644 --- a/Telegram/Resources/winrc/Telegram.rc +++ b/Telegram/Resources/winrc/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,17,0 - PRODUCTVERSION 1,0,17,0 + FILEVERSION 1,0,17,1 + PRODUCTVERSION 1,0,17,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -52,10 +52,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram Messenger LLP" VALUE "FileDescription", "Telegram Desktop" - VALUE "FileVersion", "1.0.17.0" + VALUE "FileVersion", "1.0.17.1" VALUE "LegalCopyright", "Copyright (C) 2014-2017" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "1.0.17.0" + VALUE "ProductVersion", "1.0.17.1" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 38b2fc1c3..3c755351e 100644 --- a/Telegram/Resources/winrc/Updater.rc +++ b/Telegram/Resources/winrc/Updater.rc @@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,17,0 - PRODUCTVERSION 1,0,17,0 + FILEVERSION 1,0,17,1 + PRODUCTVERSION 1,0,17,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -43,10 +43,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram Messenger LLP" VALUE "FileDescription", "Telegram Desktop Updater" - VALUE "FileVersion", "1.0.17.0" + VALUE "FileVersion", "1.0.17.1" VALUE "LegalCopyright", "Copyright (C) 2014-2017" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "1.0.17.0" + VALUE "ProductVersion", "1.0.17.1" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index f4054277c..a83ebdb4f 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -22,9 +22,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "core/utils.h" -#define BETA_VERSION_MACRO (0ULL) +#define BETA_VERSION_MACRO (1000017001ULL) constexpr int AppVersion = 1000017; constexpr str_const AppVersionStr = "1.0.17"; -constexpr bool AppAlphaVersion = true; +constexpr bool AppAlphaVersion = false; constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO; diff --git a/Telegram/SourceFiles/messenger.cpp b/Telegram/SourceFiles/messenger.cpp index 0b1813ef5..74703bb74 100644 --- a/Telegram/SourceFiles/messenger.cpp +++ b/Telegram/SourceFiles/messenger.cpp @@ -318,7 +318,7 @@ void Messenger::destroyStaleAuthorizationKeys() { auto keys = _mtproto->getKeysForWrite(); for (auto &key : keys) { // Disable this for now. - if (false && key->type() == MTP::AuthKey::Type::ReadFromFile) { + if (key->type() == MTP::AuthKey::Type::ReadFromFile) { _private->mtpKeysToDestroy = _mtproto->getKeysForWrite(); _mtproto.reset(); LOG(("MTP Info: destroying stale keys, count: %1").arg(_private->mtpKeysToDestroy.size())); diff --git a/Telegram/build/version b/Telegram/build/version index 865b7fbfd..79ea8fe3d 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -2,5 +2,5 @@ AppVersion 1000017 AppVersionStrMajor 1.0 AppVersionStrSmall 1.0.17 AppVersionStr 1.0.17 -AlphaChannel 1 -BetaVersion 0 +AlphaChannel 0 +BetaVersion 1000017001