From 5bfbae3afc9c666823d0589911e24aec35281247 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 16 May 2024 12:54:39 +0400 Subject: [PATCH] Update API scheme on layer 180. --- Telegram/SourceFiles/api/api_confirm_phone.cpp | 4 +++- Telegram/SourceFiles/intro/intro_code.cpp | 8 ++++++-- Telegram/SourceFiles/mtproto/scheme/api.tl | 9 +++++---- .../SourceFiles/passport/passport_form_controller.cpp | 4 +++- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Telegram/SourceFiles/api/api_confirm_phone.cpp b/Telegram/SourceFiles/api/api_confirm_phone.cpp index f4788e128..3a42a793d 100644 --- a/Telegram/SourceFiles/api/api_confirm_phone.cpp +++ b/Telegram/SourceFiles/api/api_confirm_phone.cpp @@ -97,8 +97,10 @@ void ConfirmPhone::resolve( box->resendRequests( ) | rpl::start_with_next([=] { _api.request(MTPauth_ResendCode( + MTP_flags(0), MTP_string(phone), - MTP_string(phoneHash) + MTP_string(phoneHash), + MTPstring() // reason )).done([=] { if (boxWeak) { boxWeak->callDone(); diff --git a/Telegram/SourceFiles/intro/intro_code.cpp b/Telegram/SourceFiles/intro/intro_code.cpp index e5d09140c..e48e8bb59 100644 --- a/Telegram/SourceFiles/intro/intro_code.cpp +++ b/Telegram/SourceFiles/intro/intro_code.cpp @@ -266,8 +266,10 @@ void CodeWidget::sendCall() { _callStatus = CallStatus::Calling; _callTimer.cancel(); _callRequestId = api().request(MTPauth_ResendCode( + MTP_flags(0), MTP_string(getData()->phone), - MTP_bytes(getData()->phoneHash) + MTP_bytes(getData()->phoneHash), + MTPstring() // reason )).done([=](const MTPauth_SentCode &result) { callDone(result); }).send(); @@ -376,8 +378,10 @@ void CodeWidget::noTelegramCode() { return; } _noTelegramCodeRequestId = api().request(MTPauth_ResendCode( + MTP_flags(0), MTP_string(getData()->phone), - MTP_bytes(getData()->phoneHash) + MTP_bytes(getData()->phoneHash), + MTPstring() // reason )).done([=](const MTPauth_SentCode &result) { noTelegramCodeDone(result); }).fail([=](const MTP::Error &error) { diff --git a/Telegram/SourceFiles/mtproto/scheme/api.tl b/Telegram/SourceFiles/mtproto/scheme/api.tl index d83726b0e..c0d2472f9 100644 --- a/Telegram/SourceFiles/mtproto/scheme/api.tl +++ b/Telegram/SourceFiles/mtproto/scheme/api.tl @@ -758,7 +758,7 @@ auth.sentCodeTypeMissedCall#82006484 prefix:string length:int = auth.SentCodeTyp auth.sentCodeTypeEmailCode#f450f59b flags:# apple_signin_allowed:flags.0?true google_signin_allowed:flags.1?true email_pattern:string length:int reset_available_period:flags.3?int reset_pending_date:flags.4?int = auth.SentCodeType; auth.sentCodeTypeSetUpEmailRequired#a5491dea flags:# apple_signin_allowed:flags.0?true google_signin_allowed:flags.1?true = auth.SentCodeType; auth.sentCodeTypeFragmentSms#d9565c39 url:string length:int = auth.SentCodeType; -auth.sentCodeTypeFirebaseSms#e57b1432 flags:# nonce:flags.0?bytes receipt:flags.1?string push_timeout:flags.1?int length:int = auth.SentCodeType; +auth.sentCodeTypeFirebaseSms#13c90f17 flags:# nonce:flags.0?bytes play_integrity_nonce:flags.2?bytes receipt:flags.1?string push_timeout:flags.1?int length:int = auth.SentCodeType; auth.sentCodeTypeSmsWord#a416ac81 flags:# beginning:flags.0?string = auth.SentCodeType; auth.sentCodeTypeSmsPhrase#b37794af flags:# beginning:flags.0?string = auth.SentCodeType; @@ -1798,7 +1798,7 @@ invokeWithMessagesRange#365275f2 {X:Type} range:MessageRange query:!X = X; invokeWithTakeout#aca9fd2e {X:Type} takeout_id:long query:!X = X; invokeWithBusinessConnection#dd289f8e {X:Type} connection_id:string query:!X = X; invokeWithGooglePlayIntegrity#1df92984 {X:Type} nonce:string token:string query:!X = X; -invokeWithApnsSecret#dae54f8#8252da54 {X:Type} nonce:string secret:string query:!X = X; +invokeWithApnsSecret#0dae54f8 {X:Type} nonce:string secret:string query:!X = X; auth.sendCode#a677244f phone_number:string api_id:int api_hash:string settings:CodeSettings = auth.SentCode; auth.signUp#aac7b717 flags:# no_joined_notifications:flags.0?true phone_number:string phone_code_hash:string first_name:string last_name:string = auth.Authorization; @@ -1812,7 +1812,7 @@ auth.importBotAuthorization#67a3ff2c flags:int api_id:int api_hash:string bot_au auth.checkPassword#d18b4d16 password:InputCheckPasswordSRP = auth.Authorization; auth.requestPasswordRecovery#d897bc66 = auth.PasswordRecovery; auth.recoverPassword#37096c70 flags:# code:string new_settings:flags.0?account.PasswordInputSettings = auth.Authorization; -auth.resendCode#3ef1a9bf phone_number:string phone_code_hash:string = auth.SentCode; +auth.resendCode#cae47523 flags:# phone_number:string phone_code_hash:string reason:flags.0?string = auth.SentCode; auth.cancelCode#1f040578 phone_number:string phone_code_hash:string = Bool; auth.dropTempAuthKeys#8e48a188 except_auth_keys:Vector = Bool; auth.exportLoginToken#b7e085fe api_id:int api_hash:string except_ids:Vector = auth.LoginToken; @@ -1820,7 +1820,7 @@ auth.importLoginToken#95ac5ce4 token:bytes = auth.LoginToken; auth.acceptLoginToken#e894ad4d token:bytes = Authorization; auth.checkRecoveryPassword#d36bf79 code:string = Bool; auth.importWebTokenAuthorization#2db873a9 api_id:int api_hash:string web_auth_token:string = auth.Authorization; -auth.requestFirebaseSms#73ab08c0 flags:# phone_number:string phone_code_hash:string play_integrity_token:flags.0?string ios_push_secret:flags.1?string = Bool; +auth.requestFirebaseSms#8e39261e flags:# phone_number:string phone_code_hash:string safety_net_token:flags.0?string play_integrity_token:flags.2?string ios_push_secret:flags.1?string = Bool; auth.resetLoginEmail#7e960193 phone_number:string phone_code_hash:string = auth.SentCode; auth.reportMissingCode#cb9deff6 phone_number:string phone_code_hash:string mnc:string = Bool; @@ -2289,6 +2289,7 @@ channels.setBoostsToUnblockRestrictions#ad399cee channel:InputChannel boosts:int channels.setEmojiStickers#3cd930b7 channel:InputChannel stickerset:InputStickerSet = Bool; channels.reportSponsoredMessage#af8ff6b9 channel:InputChannel random_id:bytes option:bytes = channels.SponsoredMessageReportResult; channels.restrictSponsoredMessages#9ae91519 channel:InputChannel restricted:Bool = Updates; +channels.searchPosts#d19f987b hashtag:string offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages; bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON = DataJSON; bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool; diff --git a/Telegram/SourceFiles/passport/passport_form_controller.cpp b/Telegram/SourceFiles/passport/passport_form_controller.cpp index eafb62369..b7bc84207 100644 --- a/Telegram/SourceFiles/passport/passport_form_controller.cpp +++ b/Telegram/SourceFiles/passport/passport_form_controller.cpp @@ -2261,8 +2261,10 @@ void FormController::requestPhoneCall(not_null value) { value->verification.call->setStatus( { Ui::SentCodeCall::State::Calling, 0 }); _api.request(MTPauth_ResendCode( + MTP_flags(0), MTP_string(getPhoneFromValue(value)), - MTP_string(value->verification.phoneCodeHash) + MTP_string(value->verification.phoneCodeHash), + MTPstring() // reason )).done([=] { value->verification.call->callDone(); }).send();