Fix storyPrivacySettingsEveryone in td_api::story.

This commit is contained in:
levlam 2023-08-11 14:23:22 +03:00
parent 02b4793ba2
commit 7b6f0530c1

View File

@ -2551,21 +2551,19 @@ td_api::object_ptr<td_api::story> StoryManager::get_story_object(StoryFullId sto
return nullptr;
}
td_api::object_ptr<td_api::StoryPrivacySettings> privacy_settings;
td_api::object_ptr<td_api::StoryPrivacySettings> privacy_settings =
story->privacy_rules_.get_story_privacy_settings_object(td_);
if (privacy_settings == nullptr) {
if (story->is_public_) {
privacy_settings = td_api::make_object<td_api::storyPrivacySettingsEveryone>();
} else if (story->is_for_contacts_) {
privacy_settings = td_api::make_object<td_api::storyPrivacySettingsContacts>();
} else if (story->is_for_close_friends_) {
privacy_settings = td_api::make_object<td_api::storyPrivacySettingsCloseFriends>();
} else {
privacy_settings = story->privacy_rules_.get_story_privacy_settings_object(td_);
if (privacy_settings == nullptr) {
if (story->is_for_contacts_) {
privacy_settings = td_api::make_object<td_api::storyPrivacySettingsContacts>();
} else {
privacy_settings = td_api::make_object<td_api::storyPrivacySettingsSelectedContacts>();
}
}
}
bool is_being_edited = false;
bool is_edited = story->is_edited_;