From e581ec4aeafa876b460464bf7e2292a6c30848f0 Mon Sep 17 00:00:00 2001 From: immat0x1 Date: Wed, 13 Jul 2022 21:28:25 +0500 Subject: [PATCH] [other] update sms_hash --- TMessagesProj/build.gradle | 8 -------- .../src/main/java/org/telegram/messenger/BuildVars.java | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index 8f9c735ff..2f02be8be 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -63,13 +63,6 @@ static def getAppHash() { return "\"" + properties.get("APP_HASH") + "\"" } -static def getSmsHash() { - Properties properties = new Properties() - properties.load(new FileInputStream("./API_KEYS")) - - return "\"" + properties.get("SMS_HASH") + "\"" -} - static def getGoogleMapsAPI() { Properties properties = new Properties() properties.load(new FileInputStream("./API_KEYS")) @@ -250,7 +243,6 @@ android { // Telegram: https://core.telegram.org/api/obtaining_api_id buildConfigField 'int', 'APP_ID', getAppID() buildConfigField 'String', 'APP_HASH', getAppHash() - buildConfigField 'String', 'SMS_HASH', getSmsHash() // Google Console: https://console.cloud.google.com/google/maps-apis/credentials resValue 'string', 'MAPS_V2_API', getGoogleMapsAPI() diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java index c493f5bdc..1746e7d99 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java @@ -38,7 +38,8 @@ public class BuildVars { APP_ID = BuildConfig.APP_ID; // Obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id APP_HASH = BuildConfig.APP_HASH; // Obtain your own APP_HASH at https://core.telegram.org/api/obtaining_api_id - SMS_HASH = BuildConfig.SMS_HASH; // Obtain your own SMS_HASH with https://bit.ly/3rxcuTd + SMS_HASH = isBetaApp() ? "2P1CNXYRAK6" : "UfajQkYoxTu"; + // Using our SMS_HASH you will not be able to get the SMS Retriever to work, generate your own keys with https://raw.githubusercontent.com/googlearchive/android-credentials/master/sms-verification/bin/sms_retriever_hash_v9.sh if (ApplicationLoader.applicationContext != null) { SharedPreferences sharedPreferences = ApplicationLoader.applicationContext.getSharedPreferences("systemConfig", Context.MODE_PRIVATE);