Update API scheme on layer 160.

This commit is contained in:
John Preston 2023-06-13 22:07:29 +04:00
parent 881867186a
commit cdb5f4dc1e
4 changed files with 12 additions and 4 deletions

View File

@ -53,7 +53,11 @@ struct FileReferenceAccumulator {
push(data.data().vdocument());
}
void push(const MTPWebPageAttribute &data) {
push(data.data().vdocuments());
data.match([&](const MTPDwebPageAttributeStory &data) {
push(data.vstory());
}, [&](const MTPDwebPageAttributeTheme &data) {
push(data.vdocuments());
});
}
void push(const MTPWebPage &data) {
data.match([&](const MTPDwebPage &data) {

View File

@ -3311,6 +3311,8 @@ void Session::webpageApplyFields(
const auto result = attribute.match([&](
const MTPDwebPageAttributeTheme &data) {
return lookupInAttribute(data);
}, [&](const MTPDwebPageAttributeStory &data) {
return (DocumentData*)nullptr;
});
if (result) {
return result;

View File

@ -43,8 +43,8 @@ constexpr auto kSavedPerPage = 100;
using UpdateFlag = StoryUpdate::Flag;
[[nodiscard]] std::optional<StoryMedia> ParseMedia(
not_null<Session*> owner,
const MTPMessageMedia &media) {
not_null<Session*> owner,
const MTPMessageMedia &media) {
return media.match([&](const MTPDmessageMediaPhoto &data)
-> std::optional<StoryMedia> {
if (const auto photo = data.vphoto()) {

View File

@ -1195,6 +1195,7 @@ inputThemeSettings#8fde504f flags:# message_colors_animated:flags.2?true base_th
themeSettings#fa58b6d4 flags:# message_colors_animated:flags.2?true base_theme:BaseTheme accent_color:int outbox_accent_color:flags.3?int message_colors:flags.0?Vector<int> wallpaper:flags.1?WallPaper = ThemeSettings;
webPageAttributeTheme#54b56617 flags:# documents:flags.0?Vector<Document> settings:flags.1?ThemeSettings = WebPageAttribute;
webPageAttributeStory#939a4671 flags:# user_id:long id:int story:flags.0?StoryItem = WebPageAttribute;
messages.votesList#4899484e flags:# count:int votes:Vector<MessagePeerVote> chats:Vector<Chat> users:Vector<User> next_offset:flags.0?string = messages.VotesList;
@ -1529,7 +1530,7 @@ storyViews#d36760cf flags:# views_count:int recent_viewers:flags.0?Vector<long>
storyItemDeleted#51e6ee4f id:int = StoryItem;
storyItemSkipped#693206a2 id:int date:int expire_date:int = StoryItem;
storyItem#562aa637 flags:# pinned:flags.5?true public:flags.7?true close_friends:flags.8?true id:int date:int expire_date:int caption:flags.0?string entities:flags.1?Vector<MessageEntity> media:MessageMedia privacy:flags.2?Vector<PrivacyRule> views:flags.3?StoryViews = StoryItem;
storyItem#562aa637 flags:# pinned:flags.5?true public:flags.7?true close_friends:flags.8?true min:flags.9?true id:int date:int expire_date:int caption:flags.0?string entities:flags.1?Vector<MessageEntity> media:MessageMedia privacy:flags.2?Vector<PrivacyRule> views:flags.3?StoryViews = StoryItem;
userStories#8611a200 flags:# user_id:long max_read_id:flags.0?int stories:Vector<StoryItem> = UserStories;
@ -2095,6 +2096,7 @@ stories.getUserStories#96d528e0 user_id:InputUser = stories.UserStories;
stories.getPinnedStories#b471137 user_id:InputUser offset_id:int limit:int = stories.Stories;
stories.getStoriesArchive#1f5bc5d2 offset_id:int limit:int = stories.Stories;
stories.getStoriesByID#6a15cf46 user_id:InputUser id:Vector<int> = stories.Stories;
stories.toggleAllStoriesHidden#7c2557c4 hidden:Bool = Bool;
stories.readStories#edc5105b user_id:InputUser max_id:int = Vector<int>;
stories.incrementStoryViews#22126127 user_id:InputUser id:Vector<int> = Bool;
stories.getStoryViewsList#4b3b5e97 id:int offset_date:int offset_id:long limit:int = stories.StoryViewsList;