Rename activeStories to chatActiveStories.
This commit is contained in:
parent
00608a45a3
commit
987faa7c6a
@ -4963,7 +4963,7 @@ storyInfo story_id:int32 date:int32 = StoryInfo;
|
||||
//@order A parameter used to determine order of the stories in the story list; 0 if the stories doesn't need to be shown in the story list. Stories must be sorted by the pair (order, story_sender_chat_id) in descending order
|
||||
//@max_read_story_id Identifier of the last read active story
|
||||
//@stories Basic information about the stories; use getStory to get full information about the stories. The stories are in a chronological order (i.e., in order of increasing story identifiers)
|
||||
activeStories chat_id:int53 list:StoryList order:int53 max_read_story_id:int32 stories:vector<storyInfo> = ActiveStories;
|
||||
chatActiveStories chat_id:int53 list:StoryList order:int53 max_read_story_id:int32 stories:vector<storyInfo> = ChatActiveStories;
|
||||
|
||||
|
||||
//@description Contains a part of a file @data File bytes
|
||||
@ -5729,7 +5729,7 @@ updateStoryDeleted story_sender_chat_id:int53 story_id:int32 = Update;
|
||||
|
||||
//@description The list of active stories posted by a specific chat has changed
|
||||
//@active_stories The new list of active stories
|
||||
updateChatActiveStories active_stories:activeStories = Update;
|
||||
updateChatActiveStories active_stories:chatActiveStories = Update;
|
||||
|
||||
//@description An option changed its value @name The option name @value The new option value
|
||||
updateOption name:string value:OptionValue = Update;
|
||||
@ -7296,7 +7296,7 @@ toggleChatStoriesAreHidden chat_id:int53 are_hidden:Bool = Ok;
|
||||
getStoryNotificationSettingsExceptions = Chats;
|
||||
|
||||
//@description Returns the list of active stories posted by the given chat @chat_id Chat identifier
|
||||
getChatActiveStories chat_id:int53 = ActiveStories;
|
||||
getChatActiveStories chat_id:int53 = ChatActiveStories;
|
||||
|
||||
//@description Returns the list of pinned stories posted by the given chat. The stories are returned in a reverse chronological order (i.e., in order of decreasing story_id).
|
||||
//-For optimal performance, the number of returned stories is chosen by TDLib
|
||||
|
@ -1234,7 +1234,7 @@ void StoryManager::on_get_story_archive(telegram_api::object_ptr<telegram_api::s
|
||||
}
|
||||
|
||||
void StoryManager::get_dialog_expiring_stories(DialogId owner_dialog_id,
|
||||
Promise<td_api::object_ptr<td_api::activeStories>> &&promise) {
|
||||
Promise<td_api::object_ptr<td_api::chatActiveStories>> &&promise) {
|
||||
TRY_STATUS_PROMISE(promise, G()->close_status());
|
||||
if (!td_->messages_manager_->have_dialog_force(owner_dialog_id, "get_dialog_expiring_stories")) {
|
||||
return promise.set_error(Status::Error(400, "Story sender not found"));
|
||||
@ -1243,7 +1243,7 @@ void StoryManager::get_dialog_expiring_stories(DialogId owner_dialog_id,
|
||||
return promise.set_error(Status::Error(400, "Can't access the story sender"));
|
||||
}
|
||||
if (owner_dialog_id.get_type() != DialogType::User) {
|
||||
return promise.set_value(get_active_stories_object(owner_dialog_id));
|
||||
return promise.set_value(get_chat_active_stories_object(owner_dialog_id));
|
||||
}
|
||||
|
||||
auto active_stories = get_active_stories(owner_dialog_id);
|
||||
@ -1251,7 +1251,7 @@ void StoryManager::get_dialog_expiring_stories(DialogId owner_dialog_id,
|
||||
if (!promise) {
|
||||
return promise.set_value(nullptr);
|
||||
}
|
||||
promise.set_value(get_active_stories_object(owner_dialog_id));
|
||||
promise.set_value(get_chat_active_stories_object(owner_dialog_id));
|
||||
promise = {};
|
||||
}
|
||||
|
||||
@ -1303,7 +1303,7 @@ void StoryManager::load_dialog_expiring_stories(DialogId owner_dialog_id, uint64
|
||||
|
||||
// send later to ensure that active stories are inited before sending the request
|
||||
auto promise = PromiseCreator::lambda(
|
||||
[actor_id = actor_id(this), owner_dialog_id](Result<td_api::object_ptr<td_api::activeStories>> &&) {
|
||||
[actor_id = actor_id(this), owner_dialog_id](Result<td_api::object_ptr<td_api::chatActiveStories>> &&) {
|
||||
if (!G()->close_flag()) {
|
||||
send_closure(actor_id, &StoryManager::on_load_dialog_expiring_stories, owner_dialog_id);
|
||||
}
|
||||
@ -1329,12 +1329,12 @@ void StoryManager::on_load_dialog_expiring_stories(DialogId owner_dialog_id) {
|
||||
|
||||
void StoryManager::on_get_dialog_expiring_stories(DialogId owner_dialog_id,
|
||||
telegram_api::object_ptr<telegram_api::stories_userStories> &&stories,
|
||||
Promise<td_api::object_ptr<td_api::activeStories>> &&promise) {
|
||||
Promise<td_api::object_ptr<td_api::chatActiveStories>> &&promise) {
|
||||
TRY_STATUS_PROMISE(promise, G()->close_status());
|
||||
td_->contacts_manager_->on_get_users(std::move(stories->users_), "on_get_dialog_expiring_stories");
|
||||
owner_dialog_id = on_get_user_stories(owner_dialog_id, std::move(stories->stories_));
|
||||
if (promise) {
|
||||
promise.set_value(get_active_stories_object(owner_dialog_id));
|
||||
promise.set_value(get_chat_active_stories_object(owner_dialog_id));
|
||||
} else {
|
||||
promise.set_value(nullptr);
|
||||
}
|
||||
@ -1821,7 +1821,8 @@ td_api::object_ptr<td_api::stories> StoryManager::get_stories_object(int32 total
|
||||
}));
|
||||
}
|
||||
|
||||
td_api::object_ptr<td_api::activeStories> StoryManager::get_active_stories_object(DialogId owner_dialog_id) const {
|
||||
td_api::object_ptr<td_api::chatActiveStories> StoryManager::get_chat_active_stories_object(
|
||||
DialogId owner_dialog_id) const {
|
||||
const auto *active_stories = get_active_stories(owner_dialog_id);
|
||||
|
||||
td_api::object_ptr<td_api::StoryList> list;
|
||||
@ -1846,7 +1847,7 @@ td_api::object_ptr<td_api::activeStories> StoryManager::get_active_stories_objec
|
||||
order = active_stories->public_order_;
|
||||
}
|
||||
}
|
||||
return td_api::make_object<td_api::activeStories>(
|
||||
return td_api::make_object<td_api::chatActiveStories>(
|
||||
td_->messages_manager_->get_chat_id_object(owner_dialog_id, "updateChatActiveStories"), std::move(list), order,
|
||||
max_read_story_id.get(), std::move(stories));
|
||||
}
|
||||
@ -2424,7 +2425,7 @@ void StoryManager::delete_active_stories_from_story_list(DialogId owner_dialog_i
|
||||
|
||||
td_api::object_ptr<td_api::updateChatActiveStories> StoryManager::get_update_chat_active_stories(
|
||||
DialogId owner_dialog_id) const {
|
||||
return td_api::make_object<td_api::updateChatActiveStories>(get_active_stories_object(owner_dialog_id));
|
||||
return td_api::make_object<td_api::updateChatActiveStories>(get_chat_active_stories_object(owner_dialog_id));
|
||||
}
|
||||
|
||||
void StoryManager::send_update_chat_active_stories(DialogId owner_dialog_id) {
|
||||
|
@ -166,7 +166,7 @@ class StoryManager final : public Actor {
|
||||
void get_story_archive(StoryId from_story_id, int32 limit, Promise<td_api::object_ptr<td_api::stories>> &&promise);
|
||||
|
||||
void get_dialog_expiring_stories(DialogId owner_dialog_id,
|
||||
Promise<td_api::object_ptr<td_api::activeStories>> &&promise);
|
||||
Promise<td_api::object_ptr<td_api::chatActiveStories>> &&promise);
|
||||
|
||||
void open_story(DialogId owner_dialog_id, StoryId story_id, Promise<Unit> &&promise);
|
||||
|
||||
@ -300,7 +300,7 @@ class StoryManager final : public Actor {
|
||||
|
||||
td_api::object_ptr<td_api::story> get_story_object(StoryFullId story_full_id, const Story *story) const;
|
||||
|
||||
td_api::object_ptr<td_api::activeStories> get_active_stories_object(DialogId owner_dialog_id) const;
|
||||
td_api::object_ptr<td_api::chatActiveStories> get_chat_active_stories_object(DialogId owner_dialog_id) const;
|
||||
|
||||
StoryId on_get_new_story(DialogId owner_dialog_id, telegram_api::object_ptr<telegram_api::storyItem> &&story_item);
|
||||
|
||||
@ -321,7 +321,7 @@ class StoryManager final : public Actor {
|
||||
|
||||
void on_get_dialog_expiring_stories(DialogId owner_dialog_id,
|
||||
telegram_api::object_ptr<telegram_api::stories_userStories> &&stories,
|
||||
Promise<td_api::object_ptr<td_api::activeStories>> &&promise);
|
||||
Promise<td_api::object_ptr<td_api::chatActiveStories>> &&promise);
|
||||
|
||||
static uint64 save_load_dialog_expiring_stories_log_event(DialogId owner_dialog_id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user