From e9c8fb8cb4e4b10be6e19b67cbddd0f187f64240 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 13 Feb 2024 13:07:09 +0300 Subject: [PATCH] Ignore story privacy settings for channel stories. --- td/generate/scheme/td_api.tl | 2 +- td/telegram/StoryManager.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 14e6d6ccf..198a8f7db 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -8425,7 +8425,7 @@ canSendStory chat_id:int53 = CanSendStoryResult; //@content Content of the story //@areas Clickable rectangle areas to be shown on the story media; pass null if none //@caption Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters -//@privacy_settings The privacy settings for the story +//@privacy_settings The privacy settings for the story; ignored for stories sent to supergroup and channel chats //@active_period Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise //@from_story_full_id Full identifier of the original story, which content was used to create the story //@is_pinned Pass true to keep the story accessible after expiration diff --git a/td/telegram/StoryManager.cpp b/td/telegram/StoryManager.cpp index 963f65025..a2f72ad66 100644 --- a/td/telegram/StoryManager.cpp +++ b/td/telegram/StoryManager.cpp @@ -4708,6 +4708,9 @@ void StoryManager::send_story(DialogId dialog_id, td_api::object_ptrdialog_manager_->get_my_dialog_id()) { + settings = td_api::make_object(); + } TRY_RESULT_PROMISE(promise, privacy_rules, UserPrivacySettingRules::get_user_privacy_setting_rules(td_, std::move(settings))); unique_ptr forward_info;