mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Update API scheme to layer181.
This commit is contained in:
parent
1ce49df123
commit
39e03c3ca7
8 changed files with 47 additions and 12 deletions
|
@ -1138,7 +1138,8 @@ void Updates::applyUpdatesNoPtsCheck(const MTPUpdates &updates) {
|
|||
MTPVector<MTPRestrictionReason>(),
|
||||
MTP_int(d.vttl_period().value_or_empty()),
|
||||
MTPint(), // quick_reply_shortcut_id
|
||||
MTPlong()), // effect
|
||||
MTPlong(), // effect
|
||||
MTPFactCheck()),
|
||||
MessageFlags(),
|
||||
NewMessageType::Unread);
|
||||
} break;
|
||||
|
@ -1174,7 +1175,8 @@ void Updates::applyUpdatesNoPtsCheck(const MTPUpdates &updates) {
|
|||
MTPVector<MTPRestrictionReason>(),
|
||||
MTP_int(d.vttl_period().value_or_empty()),
|
||||
MTPint(), // quick_reply_shortcut_id
|
||||
MTPlong()), // effect
|
||||
MTPlong(), // effect
|
||||
MTPFactCheck()),
|
||||
MessageFlags(),
|
||||
NewMessageType::Unread);
|
||||
} break;
|
||||
|
|
|
@ -88,7 +88,8 @@ constexpr auto kRequestTimeLimit = 60 * crl::time(1000);
|
|||
MTPVector<MTPRestrictionReason>(),
|
||||
MTP_int(data.vttl_period().value_or_empty()),
|
||||
MTP_int(shortcutId),
|
||||
MTP_long(data.veffect().value_or_empty()));
|
||||
MTP_long(data.veffect().value_or_empty()),
|
||||
(data.vfactcheck() ? *data.vfactcheck() : MTPFactCheck()));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,8 @@ constexpr auto kRequestTimeLimit = 60 * crl::time(1000);
|
|||
MTPVector<MTPRestrictionReason>(),
|
||||
MTP_int(data.vttl_period().value_or_empty()),
|
||||
MTPint(), // quick_reply_shortcut_id
|
||||
MTP_long(data.veffect().value_or_empty())); // effect
|
||||
MTP_long(data.veffect().value_or_empty()), // effect
|
||||
data.vfactcheck() ? *data.vfactcheck() : MTPFactCheck());
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -264,7 +265,8 @@ void ScheduledMessages::sendNowSimpleMessage(
|
|||
MTPVector<MTPRestrictionReason>(),
|
||||
MTP_int(update.vttl_period().value_or_empty()),
|
||||
MTPint(), // quick_reply_shortcut_id
|
||||
MTP_long(local->effectId())), // effect
|
||||
MTP_long(local->effectId()), // effect
|
||||
MTPFactCheck()),
|
||||
localFlags,
|
||||
NewMessageType::Unread);
|
||||
|
||||
|
|
|
@ -4572,7 +4572,8 @@ void Session::insertCheckedServiceNotification(
|
|||
MTPVector<MTPRestrictionReason>(),
|
||||
MTPint(), // ttl_period
|
||||
MTPint(), // quick_reply_shortcut_id
|
||||
MTPlong()), // effect
|
||||
MTPlong(), // effect
|
||||
MTPFactCheck()),
|
||||
localFlags,
|
||||
NewMessageType::Unread);
|
||||
}
|
||||
|
|
|
@ -140,7 +140,8 @@ MTPMessage PrepareLogMessage(const MTPMessage &message, TimeId newDate) {
|
|||
MTPVector<MTPRestrictionReason>(),
|
||||
MTPint(), // ttl_period
|
||||
MTPint(), // quick_reply_shortcut_id
|
||||
MTP_long(data.veffect().value_or_empty()));
|
||||
MTP_long(data.veffect().value_or_empty()),
|
||||
data.vfactcheck() ? *data.vfactcheck() : MTPFactCheck());
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ inputMediaVenue#c13d1c11 geo_point:InputGeoPoint title:string address:string pro
|
|||
inputMediaPhotoExternal#e5bbfe1a flags:# spoiler:flags.1?true url:string ttl_seconds:flags.0?int = InputMedia;
|
||||
inputMediaDocumentExternal#fb52dc99 flags:# spoiler:flags.1?true url:string ttl_seconds:flags.0?int = InputMedia;
|
||||
inputMediaGame#d33f43f3 id:InputGame = InputMedia;
|
||||
inputMediaInvoice#8eb5a6d5 flags:# title:string description:string photo:flags.0?InputWebDocument invoice:Invoice payload:bytes provider:string provider_data:DataJSON start_param:flags.1?string extended_media:flags.2?InputMedia = InputMedia;
|
||||
inputMediaInvoice#405fef0d flags:# title:string description:string photo:flags.0?InputWebDocument invoice:Invoice payload:bytes provider:flags.3?string provider_data:DataJSON start_param:flags.1?string extended_media:flags.2?InputMedia = InputMedia;
|
||||
inputMediaGeoLive#971fa843 flags:# stopped:flags.0?true geo_point:InputGeoPoint heading:flags.2?int period:flags.1?int proximity_notification_radius:flags.3?int = InputMedia;
|
||||
inputMediaPoll#f94e5f1 flags:# poll:Poll correct_answers:flags.0?Vector<bytes> solution:flags.1?string solution_entities:flags.1?Vector<MessageEntity> = InputMedia;
|
||||
inputMediaDice#e66fbf7b emoticon:string = InputMedia;
|
||||
|
@ -114,7 +114,7 @@ chatPhotoEmpty#37c1011c = ChatPhoto;
|
|||
chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;
|
||||
|
||||
messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message;
|
||||
message#bde09c2e flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int effect:flags2.2?long = Message;
|
||||
message#94345242 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int effect:flags2.2?long factcheck:flags2.3?FactCheck = Message;
|
||||
messageService#2b085862 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction ttl_period:flags.25?int = Message;
|
||||
|
||||
messageMediaEmpty#3ded6320 = MessageMedia;
|
||||
|
@ -414,6 +414,7 @@ updateBotEditBusinessMessage#7df587c flags:# connection_id:string message:Messag
|
|||
updateBotDeleteBusinessMessage#a02a982e connection_id:string peer:Peer messages:Vector<int> qts:int = Update;
|
||||
updateNewStoryReaction#1824e40b story_id:int peer:Peer reaction:Reaction = Update;
|
||||
updateBroadcastRevenueTransactions#dfd961f5 peer:Peer balances:BroadcastRevenueBalances = Update;
|
||||
updateStarsBalance#fb85198 balance:long = Update;
|
||||
|
||||
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
|
||||
|
||||
|
@ -901,6 +902,7 @@ inputWebFileAudioAlbumThumbLocation#f46fe924 flags:# small:flags.2?true document
|
|||
upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;
|
||||
|
||||
payments.paymentForm#a0058751 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON additional_methods:flags.6?Vector<PaymentFormMethod> saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?Vector<PaymentSavedCredentials> users:Vector<User> = payments.PaymentForm;
|
||||
payments.paymentFormStars#7bf6b15c flags:# form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice users:Vector<User> = payments.PaymentForm;
|
||||
|
||||
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = payments.ValidatedRequestedInfo;
|
||||
|
||||
|
@ -1447,6 +1449,7 @@ attachMenuPeerTypeBroadcast#7bfbdefc = AttachMenuPeerType;
|
|||
inputInvoiceMessage#c5b56859 peer:InputPeer msg_id:int = InputInvoice;
|
||||
inputInvoiceSlug#c326caef slug:string = InputInvoice;
|
||||
inputInvoicePremiumGiftCode#98986c0d purpose:InputStorePaymentPurpose option:PremiumGiftCodeOption = InputInvoice;
|
||||
inputInvoiceStars#1da33ad8 option:StarsTopupOption = InputInvoice;
|
||||
|
||||
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice;
|
||||
|
||||
|
@ -1458,6 +1461,7 @@ inputStorePaymentPremiumSubscription#a6751e66 flags:# restore:flags.0?true upgra
|
|||
inputStorePaymentGiftPremium#616f7fe8 user_id:InputUser currency:string amount:long = InputStorePaymentPurpose;
|
||||
inputStorePaymentPremiumGiftCode#a3805f3f flags:# users:Vector<InputUser> boost_peer:flags.0?InputPeer currency:string amount:long = InputStorePaymentPurpose;
|
||||
inputStorePaymentPremiumGiveaway#160544ca flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.3?true boost_peer:InputPeer additional_peers:flags.1?Vector<InputPeer> countries_iso2:flags.2?Vector<string> prize_description:flags.4?string random_id:long until_date:int currency:string amount:long = InputStorePaymentPurpose;
|
||||
inputStorePaymentStars#4f0ee8df flags:# stars:long currency:string amount:long = InputStorePaymentPurpose;
|
||||
|
||||
premiumGiftOption#74c34319 flags:# months:int currency:string amount:long bot_url:string store_product:flags.0?string = PremiumGiftOption;
|
||||
|
||||
|
@ -1787,6 +1791,19 @@ availableEffect#93c3e27e flags:# premium_required:flags.2?true id:long emoticon:
|
|||
messages.availableEffectsNotModified#d1ed9a5b = messages.AvailableEffects;
|
||||
messages.availableEffects#bddb616e hash:int effects:Vector<AvailableEffect> documents:Vector<Document> = messages.AvailableEffects;
|
||||
|
||||
factCheck#b89bfccf flags:# need_check:flags.0?true country:flags.1?string text:flags.1?TextWithEntities hash:long = FactCheck;
|
||||
|
||||
starsTransactionPeerAppStore#b457b375 = StarsTransactionPeer;
|
||||
starsTransactionPeerPlayMarket#7b560a0b = StarsTransactionPeer;
|
||||
starsTransactionPeerFragment#e92fd902 = StarsTransactionPeer;
|
||||
starsTransactionPeer#d80da15d peer:Peer = StarsTransactionPeer;
|
||||
|
||||
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
|
||||
|
||||
starsTransaction#5f6b790c id:string stars:long date:int peer:StarsTransactionPeer = StarsTransaction;
|
||||
|
||||
payments.starsStatus#8cf4ee60 flags:# balance:long history:Vector<StarsTransaction> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.StarsStatus;
|
||||
|
||||
---functions---
|
||||
|
||||
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
|
||||
|
@ -2179,6 +2196,9 @@ messages.toggleDialogFilterTags#fd2dda49 enabled:Bool = Bool;
|
|||
messages.getMyStickers#d0b5e1fc offset_id:long limit:int = messages.MyStickers;
|
||||
messages.getEmojiStickerGroups#1dd840f5 hash:int = messages.EmojiGroups;
|
||||
messages.getAvailableEffects#dea20a39 hash:int = messages.AvailableEffects;
|
||||
messages.editFactCheck#589ee75 peer:InputPeer msg_id:int text:TextWithEntities = Updates;
|
||||
messages.deleteFactCheck#d1da940c peer:InputPeer msg_id:int = Updates;
|
||||
messages.getFactCheck#b9cdc5ee peer:InputPeer msg_id:Vector<int> = Vector<FactCheck>;
|
||||
|
||||
updates.getState#edd4882a = updates.State;
|
||||
updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;
|
||||
|
@ -2324,6 +2344,10 @@ payments.checkGiftCode#8e51b4c1 slug:string = payments.CheckedGiftCode;
|
|||
payments.applyGiftCode#f6e26854 slug:string = Updates;
|
||||
payments.getGiveawayInfo#f4239425 peer:InputPeer msg_id:int = payments.GiveawayInfo;
|
||||
payments.launchPrepaidGiveaway#5ff58f20 peer:InputPeer giveaway_id:long purpose:InputStorePaymentPurpose = Updates;
|
||||
payments.getStarsTopupOptions#c00ec7d3 = Vector<StarsTopupOption>;
|
||||
payments.getStarsStatus#104fcfa7 peer:InputPeer = payments.StarsStatus;
|
||||
payments.getStarsTransactions#673ac2f9 flags:# inbound:flags.0?true outbound:flags.1?true peer:InputPeer offset:string = payments.StarsStatus;
|
||||
payments.sendStarsForm#2bb731d flags:# form_id:long invoice:InputInvoice = payments.PaymentResult;
|
||||
|
||||
stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector<InputStickerSetItem> software:flags.3?string = messages.StickerSet;
|
||||
stickers.removeStickerFromSet#f7760f51 sticker:InputDocument = messages.StickerSet;
|
||||
|
@ -2442,4 +2466,4 @@ smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
|
|||
|
||||
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
|
||||
|
||||
// LAYER 180
|
||||
// LAYER 181
|
||||
|
|
|
@ -359,8 +359,11 @@ void Form::requestForm() {
|
|||
MTP_dataJSON(MTP_bytes(Window::Theme::WebViewParams().json))
|
||||
)).done([=](const MTPpayments_PaymentForm &result) {
|
||||
hideProgress();
|
||||
result.match([&](const auto &data) {
|
||||
result.match([&](const MTPDpayments_paymentForm &data) {
|
||||
processForm(data);
|
||||
}, [&](const MTPDpayments_paymentFormStars &data) {
|
||||
// #TODO stars
|
||||
_updates.fire(Error{ Error::Type::Form });
|
||||
});
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
hideProgress();
|
||||
|
|
|
@ -199,7 +199,8 @@ AdminLog::OwnedItem GenerateForwardedItem(
|
|||
MTPVector<MTPRestrictionReason>(),
|
||||
MTPint(), // ttl_period
|
||||
MTPint(), // quick_reply_shortcut_id
|
||||
MTPlong() // effect
|
||||
MTPlong(), // effect
|
||||
MTPFactCheck()
|
||||
).match([&](const MTPDmessage &data) {
|
||||
return history->makeMessage(
|
||||
history->nextNonHistoryEntryId(),
|
||||
|
|
Loading…
Add table
Reference in a new issue