Remove chat identifier from setStoryPrivacySettings.
This commit is contained in:
parent
e9c8fb8cb4
commit
0dc90cf820
@ -8440,11 +8440,10 @@ sendStory chat_id:int53 content:InputStoryContent areas:inputStoryAreas caption:
|
|||||||
//@caption New story caption; pass null to keep the current caption
|
//@caption New story caption; pass null to keep the current caption
|
||||||
editStory story_sender_chat_id:int53 story_id:int32 content:InputStoryContent areas:inputStoryAreas caption:formattedText = Ok;
|
editStory story_sender_chat_id:int53 story_id:int32 content:InputStoryContent areas:inputStoryAreas caption:formattedText = Ok;
|
||||||
|
|
||||||
//@description Changes privacy settings of a story. Can be called only if story.can_be_edited == true
|
//@description Changes privacy settings of a story. The method can be called only for stories posted on behalf of the current user and if story.can_be_edited == true
|
||||||
//@story_sender_chat_id Identifier of the chat that posted the story
|
|
||||||
//@story_id Identifier of the story
|
//@story_id Identifier of the story
|
||||||
//@privacy_settings The new privacy settigs for the story
|
//@privacy_settings The new privacy settigs for the story
|
||||||
setStoryPrivacySettings story_sender_chat_id:int53 story_id:int32 privacy_settings:StoryPrivacySettings = Ok;
|
setStoryPrivacySettings story_id:int32 privacy_settings:StoryPrivacySettings = Ok;
|
||||||
|
|
||||||
//@description Toggles whether a story is accessible after expiration. Can be called only if story.can_toggle_is_pinned == true
|
//@description Toggles whether a story is accessible after expiration. Can be called only if story.can_toggle_is_pinned == true
|
||||||
//@story_sender_chat_id Identifier of the chat that posted the story
|
//@story_sender_chat_id Identifier of the chat that posted the story
|
||||||
|
@ -5263,9 +5263,10 @@ void StoryManager::delete_pending_story(FileId file_id, unique_ptr<PendingStory>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StoryManager::set_story_privacy_settings(DialogId owner_dialog_id, StoryId story_id,
|
void StoryManager::set_story_privacy_settings(StoryId story_id,
|
||||||
td_api::object_ptr<td_api::StoryPrivacySettings> &&settings,
|
td_api::object_ptr<td_api::StoryPrivacySettings> &&settings,
|
||||||
Promise<Unit> &&promise) {
|
Promise<Unit> &&promise) {
|
||||||
|
DialogId owner_dialog_id(td_->dialog_manager_->get_my_dialog_id());
|
||||||
StoryFullId story_full_id{owner_dialog_id, story_id};
|
StoryFullId story_full_id{owner_dialog_id, story_id};
|
||||||
const Story *story = get_story(story_full_id);
|
const Story *story = get_story(story_full_id);
|
||||||
if (story == nullptr || story->content_ == nullptr) {
|
if (story == nullptr || story->content_ == nullptr) {
|
||||||
|
@ -227,8 +227,8 @@ class StoryManager final : public Actor {
|
|||||||
td_api::object_ptr<td_api::inputStoryAreas> &&input_areas,
|
td_api::object_ptr<td_api::inputStoryAreas> &&input_areas,
|
||||||
td_api::object_ptr<td_api::formattedText> &&input_caption, Promise<Unit> &&promise);
|
td_api::object_ptr<td_api::formattedText> &&input_caption, Promise<Unit> &&promise);
|
||||||
|
|
||||||
void set_story_privacy_settings(DialogId owner_dialog_id, StoryId story_id,
|
void set_story_privacy_settings(StoryId story_id, td_api::object_ptr<td_api::StoryPrivacySettings> &&settings,
|
||||||
td_api::object_ptr<td_api::StoryPrivacySettings> &&settings, Promise<Unit> &&promise);
|
Promise<Unit> &&promise);
|
||||||
|
|
||||||
void toggle_story_is_pinned(DialogId owner_dialog_id, StoryId story_id, bool is_pinned, Promise<Unit> &&promise);
|
void toggle_story_is_pinned(DialogId owner_dialog_id, StoryId story_id, bool is_pinned, Promise<Unit> &&promise);
|
||||||
|
|
||||||
|
@ -5783,8 +5783,8 @@ void Td::on_request(uint64 id, td_api::editStory &request) {
|
|||||||
void Td::on_request(uint64 id, td_api::setStoryPrivacySettings &request) {
|
void Td::on_request(uint64 id, td_api::setStoryPrivacySettings &request) {
|
||||||
CHECK_IS_USER();
|
CHECK_IS_USER();
|
||||||
CREATE_OK_REQUEST_PROMISE();
|
CREATE_OK_REQUEST_PROMISE();
|
||||||
story_manager_->set_story_privacy_settings(DialogId(request.story_sender_chat_id_), StoryId(request.story_id_),
|
story_manager_->set_story_privacy_settings(StoryId(request.story_id_), std::move(request.privacy_settings_),
|
||||||
std::move(request.privacy_settings_), std::move(promise));
|
std::move(promise));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Td::on_request(uint64 id, const td_api::toggleStoryIsPinned &request) {
|
void Td::on_request(uint64 id, const td_api::toggleStoryIsPinned &request) {
|
||||||
|
@ -4441,11 +4441,10 @@ class CliClient final : public Actor {
|
|||||||
to_integers<int32>(sticker_file_ids), duration, false),
|
to_integers<int32>(sticker_file_ids), duration, false),
|
||||||
areas, as_caption(caption)));
|
areas, as_caption(caption)));
|
||||||
} else if (op == "ssps") {
|
} else if (op == "ssps") {
|
||||||
ChatId story_sender_chat_id;
|
|
||||||
StoryId story_id;
|
StoryId story_id;
|
||||||
StoryPrivacySettings rules;
|
StoryPrivacySettings rules;
|
||||||
get_args(args, story_sender_chat_id, story_id, rules);
|
get_args(args, story_id, rules);
|
||||||
send_request(td_api::make_object<td_api::setStoryPrivacySettings>(story_sender_chat_id, story_id, rules));
|
send_request(td_api::make_object<td_api::setStoryPrivacySettings>(story_id, rules));
|
||||||
} else if (op == "tsip") {
|
} else if (op == "tsip") {
|
||||||
ChatId story_sender_chat_id;
|
ChatId story_sender_chat_id;
|
||||||
StoryId story_id;
|
StoryId story_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user