Rename StoryPublicForward to PublicForward.
This commit is contained in:
parent
5725cf0388
commit
67422ffb47
@ -1058,7 +1058,7 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
|
||||
//@status Status of the current user in the supergroup or channel; custom title will always be empty
|
||||
//@member_count Number of members in the supergroup or channel; 0 if unknown. Currently, it is guaranteed to be known only if the supergroup or channel was received through
|
||||
//-getChatSimilarChats, getChatsToSendStories, getCreatedPublicChats, getGroupsInCommon, getInactiveSupergroupChats, getSuitableDiscussionChats, getUserPrivacySettingRules, getVideoChatAvailableParticipants,
|
||||
//-searchChatsNearby, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or for public chats in which where sent messages and posted stories from storyPublicForwards,
|
||||
//-searchChatsNearby, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or for public chats in which where sent messages and posted stories from publicForwards,
|
||||
//-or for public chats in which where sent messages from getMessagePublicForwards response
|
||||
//@has_linked_chat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
|
||||
//@has_location True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
|
||||
@ -3584,20 +3584,20 @@ storyInfo story_id:int32 date:int32 is_for_close_friends:Bool = StoryInfo;
|
||||
chatActiveStories chat_id:int53 list:StoryList order:int53 max_read_story_id:int32 stories:vector<storyInfo> = ChatActiveStories;
|
||||
|
||||
|
||||
//@class StoryPublicForward @description Describes a public forward or repost of a story
|
||||
//@class PublicForward @description Describes a public forward or repost of a story
|
||||
|
||||
//@description Contains a public forward of a story as a message @message Information about the message with the story
|
||||
storyPublicForwardMessage message:message = StoryPublicForward;
|
||||
//@description Contains a public forward as a message @message Information about the message
|
||||
publicForwardMessage message:message = PublicForward;
|
||||
|
||||
//@description Contains a public repost of a story as a story @story Information about the reposted story
|
||||
storyPublicForwardStory story:story = StoryPublicForward;
|
||||
//@description Contains a public repost to a story @story Information about the story
|
||||
publicForwardStory story:story = PublicForward;
|
||||
|
||||
|
||||
//@description Represents a list of public forwards and reposts of a story
|
||||
//@description Represents a list of public forwards and reposts as a story of a message or a story
|
||||
//@total_count Approximate total number of messages and stories found
|
||||
//@forwards List of found public forwards and reposts
|
||||
//@next_offset The offset for the next request. If empty, then there are no more results
|
||||
storyPublicForwards total_count:int32 forwards:vector<StoryPublicForward> next_offset:string = StoryPublicForwards;
|
||||
publicForwards total_count:int32 forwards:vector<PublicForward> next_offset:string = PublicForwards;
|
||||
|
||||
|
||||
//@class ChatBoostSource @description Describes source of a chat boost
|
||||
@ -8173,7 +8173,7 @@ activateStoryStealthMode = Ok;
|
||||
//@story_id The identifier of the story
|
||||
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||
//@limit The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit
|
||||
getStoryPublicForwards story_sender_chat_id:int53 story_id:int32 offset:string limit:int32 = StoryPublicForwards;
|
||||
getStoryPublicForwards story_sender_chat_id:int53 story_id:int32 offset:string limit:int32 = PublicForwards;
|
||||
|
||||
|
||||
//@description Returns the list of available chat boost slots for the current user
|
||||
@ -9248,7 +9248,7 @@ getMessageStatistics chat_id:int53 message_id:int53 is_dark:Bool = MessageStatis
|
||||
//@message_id Message identifier
|
||||
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||
//@limit The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit
|
||||
getMessagePublicForwards chat_id:int53 message_id:int53 offset:string limit:int32 = StoryPublicForwards;
|
||||
getMessagePublicForwards chat_id:int53 message_id:int53 offset:string limit:int32 = PublicForwards;
|
||||
|
||||
//@description Returns detailed statistics about a story. Can be used only if story.can_get_statistics == true @chat_id Chat identifier @story_id Story identifier @is_dark Pass true if a dark theme is used by the application
|
||||
getStoryStatistics chat_id:int53 story_id:int32 is_dark:Bool = StoryStatistics;
|
||||
|
@ -394,11 +394,11 @@ class LoadAsyncGraphQuery final : public Td::ResultHandler {
|
||||
};
|
||||
|
||||
class GetMessagePublicForwardsQuery final : public Td::ResultHandler {
|
||||
Promise<td_api::object_ptr<td_api::storyPublicForwards>> promise_;
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> promise_;
|
||||
DialogId dialog_id_;
|
||||
|
||||
public:
|
||||
explicit GetMessagePublicForwardsQuery(Promise<td_api::object_ptr<td_api::storyPublicForwards>> &&promise)
|
||||
explicit GetMessagePublicForwardsQuery(Promise<td_api::object_ptr<td_api::publicForwards>> &&promise)
|
||||
: promise_(std::move(promise)) {
|
||||
}
|
||||
|
||||
@ -442,11 +442,11 @@ class GetMessagePublicForwardsQuery final : public Td::ResultHandler {
|
||||
};
|
||||
|
||||
class GetStoryPublicForwardsQuery final : public Td::ResultHandler {
|
||||
Promise<td_api::object_ptr<td_api::storyPublicForwards>> promise_;
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> promise_;
|
||||
DialogId dialog_id_;
|
||||
|
||||
public:
|
||||
explicit GetStoryPublicForwardsQuery(Promise<td_api::object_ptr<td_api::storyPublicForwards>> &&promise)
|
||||
explicit GetStoryPublicForwardsQuery(Promise<td_api::object_ptr<td_api::publicForwards>> &&promise)
|
||||
: promise_(std::move(promise)) {
|
||||
}
|
||||
|
||||
@ -603,9 +603,8 @@ void StatisticsManager::send_load_async_graph_query(DcId dc_id, string token, in
|
||||
td_->create_handler<LoadAsyncGraphQuery>(std::move(promise))->send(token, x, dc_id);
|
||||
}
|
||||
|
||||
void StatisticsManager::get_message_public_forwards(
|
||||
MessageFullId message_full_id, string offset, int32 limit,
|
||||
Promise<td_api::object_ptr<td_api::storyPublicForwards>> &&promise) {
|
||||
void StatisticsManager::get_message_public_forwards(MessageFullId message_full_id, string offset, int32 limit,
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> &&promise) {
|
||||
if (limit <= 0) {
|
||||
return promise.set_error(Status::Error(400, "Parameter limit must be positive"));
|
||||
}
|
||||
@ -624,7 +623,7 @@ void StatisticsManager::get_message_public_forwards(
|
||||
|
||||
void StatisticsManager::send_get_message_public_forwards_query(
|
||||
DcId dc_id, MessageFullId message_full_id, string offset, int32 limit,
|
||||
Promise<td_api::object_ptr<td_api::storyPublicForwards>> &&promise) {
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> &&promise) {
|
||||
if (!td_->messages_manager_->have_message_force(message_full_id, "send_get_message_public_forwards_query")) {
|
||||
return promise.set_error(Status::Error(400, "Message not found"));
|
||||
}
|
||||
@ -641,7 +640,7 @@ void StatisticsManager::send_get_message_public_forwards_query(
|
||||
}
|
||||
|
||||
void StatisticsManager::get_story_public_forwards(StoryFullId story_full_id, string offset, int32 limit,
|
||||
Promise<td_api::object_ptr<td_api::storyPublicForwards>> &&promise) {
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> &&promise) {
|
||||
if (limit <= 0) {
|
||||
return promise.set_error(Status::Error(400, "Parameter limit must be positive"));
|
||||
}
|
||||
@ -667,7 +666,7 @@ void StatisticsManager::get_story_public_forwards(StoryFullId story_full_id, str
|
||||
|
||||
void StatisticsManager::send_get_story_public_forwards_query(
|
||||
DcId dc_id, StoryFullId story_full_id, string offset, int32 limit,
|
||||
Promise<td_api::object_ptr<td_api::storyPublicForwards>> &&promise) {
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> &&promise) {
|
||||
if (!td_->story_manager_->have_story_force(story_full_id)) {
|
||||
return promise.set_error(Status::Error(400, "Story not found"));
|
||||
}
|
||||
@ -686,7 +685,7 @@ void StatisticsManager::send_get_story_public_forwards_query(
|
||||
|
||||
void StatisticsManager::on_get_public_forwards(
|
||||
telegram_api::object_ptr<telegram_api::stats_publicForwards> &&public_forwards,
|
||||
Promise<td_api::object_ptr<td_api::storyPublicForwards>> &&promise) {
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> &&promise) {
|
||||
TRY_STATUS_PROMISE(promise, G()->close_status());
|
||||
|
||||
td_->contacts_manager_->on_get_users(std::move(public_forwards->users_), "on_get_public_forwards");
|
||||
@ -695,7 +694,7 @@ void StatisticsManager::on_get_public_forwards(
|
||||
auto total_count = public_forwards->count_;
|
||||
LOG(INFO) << "Receive " << public_forwards->forwards_.size() << " forwarded stories out of "
|
||||
<< public_forwards->count_;
|
||||
vector<td_api::object_ptr<td_api::StoryPublicForward>> result;
|
||||
vector<td_api::object_ptr<td_api::PublicForward>> result;
|
||||
for (auto &forward_ptr : public_forwards->forwards_) {
|
||||
switch (forward_ptr->get_id()) {
|
||||
case telegram_api::publicForwardMessage::ID: {
|
||||
@ -706,7 +705,7 @@ void StatisticsManager::on_get_public_forwards(
|
||||
false, "on_get_public_forwards");
|
||||
if (message_full_id != MessageFullId()) {
|
||||
CHECK(dialog_id == message_full_id.get_dialog_id());
|
||||
result.push_back(td_api::make_object<td_api::storyPublicForwardMessage>(
|
||||
result.push_back(td_api::make_object<td_api::publicForwardMessage>(
|
||||
td_->messages_manager_->get_message_object(message_full_id, "on_get_public_forwards")));
|
||||
CHECK(result.back() != nullptr);
|
||||
} else {
|
||||
@ -719,7 +718,7 @@ void StatisticsManager::on_get_public_forwards(
|
||||
auto dialog_id = DialogId(forward->peer_);
|
||||
auto story_id = td_->story_manager_->on_get_story(dialog_id, std::move(forward->story_));
|
||||
if (story_id.is_valid() && td_->story_manager_->have_story({dialog_id, story_id})) {
|
||||
result.push_back(td_api::make_object<td_api::storyPublicForwardStory>(
|
||||
result.push_back(td_api::make_object<td_api::publicForwardStory>(
|
||||
td_->story_manager_->get_story_object({dialog_id, story_id})));
|
||||
CHECK(result.back() != nullptr);
|
||||
} else {
|
||||
@ -736,7 +735,7 @@ void StatisticsManager::on_get_public_forwards(
|
||||
total_count = static_cast<int32>(result.size());
|
||||
}
|
||||
promise.set_value(
|
||||
td_api::make_object<td_api::storyPublicForwards>(total_count, std::move(result), public_forwards->next_offset_));
|
||||
td_api::make_object<td_api::publicForwards>(total_count, std::move(result), public_forwards->next_offset_));
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
@ -40,13 +40,13 @@ class StatisticsManager final : public Actor {
|
||||
Promise<td_api::object_ptr<td_api::StatisticalGraph>> &&promise);
|
||||
|
||||
void get_message_public_forwards(MessageFullId message_full_id, string offset, int32 limit,
|
||||
Promise<td_api::object_ptr<td_api::storyPublicForwards>> &&promise);
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> &&promise);
|
||||
|
||||
void get_story_public_forwards(StoryFullId story_full_id, string offset, int32 limit,
|
||||
Promise<td_api::object_ptr<td_api::storyPublicForwards>> &&promise);
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> &&promise);
|
||||
|
||||
void on_get_public_forwards(telegram_api::object_ptr<telegram_api::stats_publicForwards> &&public_forwards,
|
||||
Promise<td_api::object_ptr<td_api::storyPublicForwards>> &&promise);
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> &&promise);
|
||||
|
||||
private:
|
||||
void tear_down() final;
|
||||
@ -64,10 +64,10 @@ class StatisticsManager final : public Actor {
|
||||
Promise<td_api::object_ptr<td_api::StatisticalGraph>> &&promise);
|
||||
|
||||
void send_get_message_public_forwards_query(DcId dc_id, MessageFullId message_full_id, string offset, int32 limit,
|
||||
Promise<td_api::object_ptr<td_api::storyPublicForwards>> &&promise);
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> &&promise);
|
||||
|
||||
void send_get_story_public_forwards_query(DcId dc_id, StoryFullId story_full_id, string offset, int32 limit,
|
||||
Promise<td_api::object_ptr<td_api::storyPublicForwards>> &&promise);
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> &&promise);
|
||||
|
||||
Td *td_;
|
||||
ActorShared<> parent_;
|
||||
|
Loading…
Reference in New Issue
Block a user