diff --git a/Telegram/SourceFiles/api/api_confirm_phone.cpp b/Telegram/SourceFiles/api/api_confirm_phone.cpp index 0dd1ae9a7..f4788e128 100644 --- a/Telegram/SourceFiles/api/api_confirm_phone.cpp +++ b/Telegram/SourceFiles/api/api_confirm_phone.cpp @@ -62,6 +62,10 @@ void ConfirmPhone::resolve( return bad("FirebaseSms"); }, [&](const MTPDauth_sentCodeTypeEmailCode &) { return bad("EmailCode"); + }, [&](const MTPDauth_sentCodeTypeSmsWord &) { + return bad("SmsWord"); + }, [&](const MTPDauth_sentCodeTypeSmsPhrase &) { + return bad("SmsPhrase"); }, [&](const MTPDauth_sentCodeTypeSetUpEmailRequired &) { return bad("SetUpEmailRequired"); }); diff --git a/Telegram/SourceFiles/data/data_poll.cpp b/Telegram/SourceFiles/data/data_poll.cpp index 800f3ee32..a7c386d0c 100644 --- a/Telegram/SourceFiles/data/data_poll.cpp +++ b/Telegram/SourceFiles/data/data_poll.cpp @@ -69,7 +69,7 @@ bool PollData::closeByTimer() { bool PollData::applyChanges(const MTPDpoll &poll) { Expects(poll.vid().v == id); - const auto newQuestion = qs(poll.vquestion()); + const auto newQuestion = qs(poll.vquestion().data().vtext()); const auto newFlags = (poll.is_closed() ? Flag::Closed : Flag(0)) | (poll.is_public_voters() ? Flag::PublicVotes : Flag(0)) | (poll.is_multiple_choice() ? Flag::MultiChoice : Flag(0)) @@ -82,7 +82,7 @@ bool PollData::applyChanges(const MTPDpoll &poll) { return data.match([](const MTPDpollAnswer &answer) { auto result = PollAnswer(); result.option = answer.voption().v; - result.text = qs(answer.vtext()); + result.text = qs(answer.vtext().data().vtext()); return result; }); }) | ranges::views::take( @@ -253,7 +253,9 @@ bool PollData::quiz() const { MTPPoll PollDataToMTP(not_null poll, bool close) { const auto convert = [](const PollAnswer &answer) { return MTP_pollAnswer( - MTP_string(answer.text), + MTP_textWithEntities( + MTP_string(answer.text), + MTP_vector()), MTP_bytes(answer.option)); }; auto answers = QVector(); @@ -272,7 +274,9 @@ MTPPoll PollDataToMTP(not_null poll, bool close) { return MTP_poll( MTP_long(poll->id), MTP_flags(flags), - MTP_string(poll->question), + MTP_textWithEntities( + MTP_string(poll->question), + MTP_vector()), MTP_vector(answers), MTP_int(poll->closePeriod), MTP_int(poll->closeDate)); diff --git a/Telegram/SourceFiles/export/data/export_data_types.cpp b/Telegram/SourceFiles/export/data/export_data_types.cpp index 2e08b24f7..c4b55f346 100644 --- a/Telegram/SourceFiles/export/data/export_data_types.cpp +++ b/Telegram/SourceFiles/export/data/export_data_types.cpp @@ -668,14 +668,14 @@ Poll ParsePoll(const MTPDmessageMediaPoll &data) { auto result = Poll(); data.vpoll().match([&](const MTPDpoll &poll) { result.id = poll.vid().v; - result.question = ParseString(poll.vquestion()); + result.question = ParseString(poll.vquestion().data().vtext()); result.closed = poll.is_closed(); result.answers = ranges::views::all( poll.vanswers().v ) | ranges::views::transform([](const MTPPollAnswer &answer) { return answer.match([](const MTPDpollAnswer &answer) { auto result = Poll::Answer(); - result.text = ParseString(answer.vtext()); + result.text = ParseString(answer.vtext().data().vtext()); result.option = answer.voption().v; return result; }); diff --git a/Telegram/SourceFiles/intro/intro_step.cpp b/Telegram/SourceFiles/intro/intro_step.cpp index c3181bd7c..9e9a266f6 100644 --- a/Telegram/SourceFiles/intro/intro_step.cpp +++ b/Telegram/SourceFiles/intro/intro_step.cpp @@ -369,6 +369,10 @@ void Step::fillSentCodeData(const MTPDauth_sentCode &data) { bad("FirebaseSms"); }, [&](const MTPDauth_sentCodeTypeEmailCode &) { bad("EmailCode"); + }, [&](const MTPDauth_sentCodeTypeSmsWord &) { + bad("SmsWord"); + }, [&](const MTPDauth_sentCodeTypeSmsPhrase &) { + bad("SmsPhrase"); }, [&](const MTPDauth_sentCodeTypeSetUpEmailRequired &) { bad("SetUpEmailRequired"); }); diff --git a/Telegram/SourceFiles/mtproto/scheme/api.tl b/Telegram/SourceFiles/mtproto/scheme/api.tl index b55127064..a75781792 100644 --- a/Telegram/SourceFiles/mtproto/scheme/api.tl +++ b/Telegram/SourceFiles/mtproto/scheme/api.tl @@ -758,6 +758,8 @@ auth.sentCodeTypeEmailCode#f450f59b flags:# apple_signin_allowed:flags.0?true go 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.sentCodeTypeSmsWord#a416ac81 flags:# beginning:flags.0?string = auth.SentCodeType; +auth.sentCodeTypeSmsPhrase#b37794af flags:# beginning:flags.0?string = auth.SentCodeType; messages.botCallbackAnswer#36585ea4 flags:# alert:flags.1?true has_url:flags.3?true native_ui:flags.4?true message:flags.0?string url:flags.2?string cache_time:int = messages.BotCallbackAnswer; @@ -1149,9 +1151,9 @@ help.supportName#8c05f1c9 name:string = help.SupportName; help.userInfoEmpty#f3ae2eed = help.UserInfo; help.userInfo#1eb3758 message:string entities:Vector author:string date:int = help.UserInfo; -pollAnswer#6ca9c2e9 text:string option:bytes = PollAnswer; +pollAnswer#ff16e2ca text:TextWithEntities option:bytes = PollAnswer; -poll#86e18161 id:long flags:# closed:flags.0?true public_voters:flags.1?true multiple_choice:flags.2?true quiz:flags.3?true question:string answers:Vector close_period:flags.4?int close_date:flags.5?int = Poll; +poll#58747131 id:long flags:# closed:flags.0?true public_voters:flags.1?true multiple_choice:flags.2?true quiz:flags.3?true question:TextWithEntities answers:Vector close_period:flags.4?int close_date:flags.5?int = Poll; pollAnswerVoters#3b6ddad2 flags:# chosen:flags.0?true correct:flags.1?true option:bytes voters:int = PollAnswerVoters; @@ -1808,6 +1810,7 @@ auth.checkRecoveryPassword#d36bf79 code:string = Bool; auth.importWebTokenAuthorization#2db873a9 api_id:int api_hash:string web_auth_token:string = auth.Authorization; auth.requestFirebaseSms#89464b50 flags:# phone_number:string phone_code_hash:string safety_net_token:flags.0?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; account.registerDevice#ec86017a flags:# no_muted:flags.0?true token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector = Bool; account.unregisterDevice#6a0d3206 token_type:int token:string other_uids:Vector = Bool; @@ -2424,4 +2427,4 @@ smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool; fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo; -// LAYER 178 +// LAYER 179 diff --git a/Telegram/SourceFiles/passport/passport_form_controller.cpp b/Telegram/SourceFiles/passport/passport_form_controller.cpp index b0ad0fcdf..eafb62369 100644 --- a/Telegram/SourceFiles/passport/passport_form_controller.cpp +++ b/Telegram/SourceFiles/passport/passport_form_controller.cpp @@ -2217,6 +2217,10 @@ void FormController::startPhoneVerification(not_null value) { bad("FirebaseSms"); }, [&](const MTPDauth_sentCodeTypeEmailCode &) { bad("EmailCode"); + }, [&](const MTPDauth_sentCodeTypeSmsWord &) { + bad("SmsWord"); + }, [&](const MTPDauth_sentCodeTypeSmsPhrase &) { + bad("SmsPhrase"); }, [&](const MTPDauth_sentCodeTypeSetUpEmailRequired &) { bad("SetUpEmailRequired"); });