Ignore story privacy settings for channel stories.
This commit is contained in:
parent
1c40ce963c
commit
e9c8fb8cb4
@ -8425,7 +8425,7 @@ canSendStory chat_id:int53 = CanSendStoryResult;
|
|||||||
//@content Content of the story
|
//@content Content of the story
|
||||||
//@areas Clickable rectangle areas to be shown on the story media; pass null if none
|
//@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
|
//@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
|
//@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
|
//@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
|
//@is_pinned Pass true to keep the story accessible after expiration
|
||||||
|
@ -4708,6 +4708,9 @@ void StoryManager::send_story(DialogId dialog_id, td_api::object_ptr<td_api::Inp
|
|||||||
TRY_RESULT_PROMISE(promise, content, get_input_story_content(td_, std::move(input_story_content), dialog_id));
|
TRY_RESULT_PROMISE(promise, content, get_input_story_content(td_, std::move(input_story_content), dialog_id));
|
||||||
TRY_RESULT_PROMISE(promise, caption,
|
TRY_RESULT_PROMISE(promise, caption,
|
||||||
get_formatted_text(td_, DialogId(), std::move(input_caption), is_bot, true, false, false));
|
get_formatted_text(td_, DialogId(), std::move(input_caption), is_bot, true, false, false));
|
||||||
|
if (dialog_id != td_->dialog_manager_->get_my_dialog_id()) {
|
||||||
|
settings = td_api::make_object<td_api::storyPrivacySettingsEveryone>();
|
||||||
|
}
|
||||||
TRY_RESULT_PROMISE(promise, privacy_rules,
|
TRY_RESULT_PROMISE(promise, privacy_rules,
|
||||||
UserPrivacySettingRules::get_user_privacy_setting_rules(td_, std::move(settings)));
|
UserPrivacySettingRules::get_user_privacy_setting_rules(td_, std::move(settings)));
|
||||||
unique_ptr<StoryForwardInfo> forward_info;
|
unique_ptr<StoryForwardInfo> forward_info;
|
||||||
|
Loading…
Reference in New Issue
Block a user