Add storyInfo.is_for_close_friends.

This commit is contained in:
levlam 2023-07-13 17:56:49 +03:00
parent 4f62b7693a
commit 5941063b43
2 changed files with 10 additions and 4 deletions

View File

@ -4957,8 +4957,11 @@ story id:int32 sender_chat_id:int53 date:int32 is_being_edited:Bool is_edited:Bo
//@description Represents a list of stories @total_count Approximate total number of stories found @stories The list of stories
stories total_count:int32 stories:vector<story> = Stories;
//@description Contains basic information about a story @story_id Unique story identifier among stories of the given sender @date Point in time (Unix timestamp) when the story was published
storyInfo story_id:int32 date:int32 = StoryInfo;
//@description Contains basic information about a story
//@story_id Unique story identifier among stories of the given sender
//@date Point in time (Unix timestamp) when the story was published
//@is_for_close_friends True, if the story is available only for close friends
storyInfo story_id:int32 date:int32 is_for_close_friends:Bool = StoryInfo;
//@description Describes active stories posted by a chat
//@chat_id Identifier of the chat that posted the stories

View File

@ -1965,7 +1965,8 @@ td_api::object_ptr<td_api::storyInfo> StoryManager::get_story_info_object(StoryF
return nullptr;
}
return td_api::make_object<td_api::storyInfo>(story_full_id.get_story_id().get(), story->date_);
return td_api::make_object<td_api::storyInfo>(story_full_id.get_story_id().get(), story->date_,
story->is_for_close_friends_);
}
td_api::object_ptr<td_api::story> StoryManager::get_story_object(StoryFullId story_full_id) const {
@ -2304,9 +2305,11 @@ StoryId StoryManager::on_get_skipped_story(DialogId owner_dialog_id,
story_item->expire_date_ = story_item->date_ + 1;
}
if (story->date_ != story_item->date_ || story->expire_date_ != story_item->expire_date_) {
if (story->date_ != story_item->date_ || story->expire_date_ != story_item->expire_date_ ||
story->is_for_close_friends_ != story_item->close_friends_) {
story->date_ = story_item->date_;
story->expire_date_ = story_item->expire_date_;
story->is_for_close_friends_ = story_item->close_friends_;
on_story_changed(story_full_id, story, true, true);
}
return story_id;