Add reply_info to messageThreadInfo.
GitOrigin-RevId: fd417ea9ed2f95d79ca3346e4fcb52f4bf8882f2
This commit is contained in:
parent
e5e9eb3838
commit
13f7c8a1aa
@ -982,9 +982,10 @@ loginUrlInfoRequestConfirmation url:string domain:string bot_user_id:int32 reque
|
||||
//@description Contains information about a message thread
|
||||
//@chat_id Identifier of the chat to which the message thread belongs
|
||||
//@message_thread_id Message thread identifier, unique within the chat
|
||||
//@reply_info Contains information about the message thread
|
||||
//@messages The messages from which the thread starts. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id)
|
||||
//@draft_message A draft of a message in the message thread; may be null
|
||||
messageThreadInfo chat_id:int53 message_thread_id:int53 messages:vector<message> draft_message:draftMessage = MessageThreadInfo;
|
||||
messageThreadInfo chat_id:int53 message_thread_id:int53 reply_info:messageReplyInfo messages:vector<message> draft_message:draftMessage = MessageThreadInfo;
|
||||
|
||||
|
||||
//@class RichText @description Describes a text object inside an instant-view web page
|
||||
|
Binary file not shown.
@ -16095,14 +16095,23 @@ td_api::object_ptr<td_api::messageThreadInfo> MessagesManager::get_message_threa
|
||||
|
||||
Dialog *d = get_dialog(info.dialog_id);
|
||||
CHECK(d != nullptr);
|
||||
td_api::object_ptr<td_api::messageReplyInfo> reply_info;
|
||||
vector<td_api::object_ptr<td_api::message>> messages;
|
||||
messages.reserve(info.message_ids.size());
|
||||
for (auto message_id : info.message_ids) {
|
||||
auto message = get_message_object(d->dialog_id, get_message_force(d, message_id, "get_message_thread_info_object"));
|
||||
const Message *m = get_message_force(d, message_id, "get_message_thread_info_object");
|
||||
auto message = get_message_object(d->dialog_id, m);
|
||||
if (message != nullptr) {
|
||||
if (message->interaction_info_ != nullptr && message->interaction_info_->reply_info_ != nullptr) {
|
||||
reply_info = m->reply_info.get_message_reply_info_object(td_->contacts_manager_.get());
|
||||
CHECK(reply_info != nullptr);
|
||||
}
|
||||
messages.push_back(std::move(message));
|
||||
}
|
||||
}
|
||||
if (reply_info == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MessageId top_thread_message_id;
|
||||
td_api::object_ptr<td_api::draftMessage> draft_message;
|
||||
@ -16116,7 +16125,8 @@ td_api::object_ptr<td_api::messageThreadInfo> MessagesManager::get_message_threa
|
||||
}
|
||||
}
|
||||
return td_api::make_object<td_api::messageThreadInfo>(d->dialog_id.get(), top_thread_message_id.get(),
|
||||
std::move(messages), std::move(draft_message));
|
||||
std::move(reply_info), std::move(messages),
|
||||
std::move(draft_message));
|
||||
}
|
||||
|
||||
void MessagesManager::get_dialog_info_full(DialogId dialog_id, Promise<Unit> &&promise) {
|
||||
|
Loading…
Reference in New Issue
Block a user