Add Story.is_visible_only_for_self.
This commit is contained in:
parent
b8bccde43c
commit
6f814dc513
@ -4923,12 +4923,13 @@ storyInteractionInfo view_count:int32 recent_viewer_user_ids:vector<int53> = Sto
|
||||
//@sender_user_id Identifier of the user that created the story
|
||||
//@date Point in time (Unix timestamp) when the story was published
|
||||
//@is_pinned True, if the story is saved in the sender's profile and will be available there after expiration
|
||||
//@is_visible_only_for_self True, if the story is visible only for the current user
|
||||
//@can_get_viewers True, users viewed the story can be received through getStoryViewers
|
||||
//@interaction_info Information about interactions with the story; may be null if the story isn't owned or there were no interactions
|
||||
//@privacy_rules Pryvacy rules affecting story visibility; may be null if the story isn't owned
|
||||
//@content Content of the story
|
||||
//@caption Caption of the story
|
||||
story id:int32 sender_user_id:int53 date:int32 is_pinned:Bool can_get_viewers:Bool interaction_info:storyInteractionInfo privacy_rules:userPrivacySettingRules content:StoryContent caption:formattedText = Story;
|
||||
story id:int32 sender_user_id:int53 date:int32 is_pinned:Bool is_visible_only_for_self:Bool can_get_viewers:Bool interaction_info:storyInteractionInfo privacy_rules:userPrivacySettingRules content:StoryContent caption:formattedText = Story;
|
||||
|
||||
//@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;
|
||||
|
@ -1407,13 +1407,17 @@ td_api::object_ptr<td_api::story> StoryManager::get_story_object(StoryFullId sto
|
||||
}
|
||||
}
|
||||
|
||||
bool is_visible_only_for_self = !story_full_id.get_story_id().is_server() ||
|
||||
dialog_id == DialogId(ContactsManager::get_service_notifications_user_id()) ||
|
||||
(!story->is_pinned_ && !is_active_story(story));
|
||||
|
||||
story->is_update_sent_ = true;
|
||||
|
||||
CHECK(dialog_id.get_type() == DialogType::User);
|
||||
return td_api::make_object<td_api::story>(
|
||||
story_full_id.get_story_id().get(),
|
||||
td_->contacts_manager_->get_user_id_object(dialog_id.get_user_id(), "get_story_object"), story->date_,
|
||||
story->is_pinned_, can_get_story_viewers(story_full_id, story).is_ok(),
|
||||
story->is_pinned_, is_visible_only_for_self, can_get_story_viewers(story_full_id, story).is_ok(),
|
||||
story->interaction_info_.get_story_interaction_info_object(td_), std::move(privacy_rules),
|
||||
get_story_content_object(td_, content),
|
||||
get_formatted_text_object(story->caption_, true, get_story_content_duration(td_, content)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user