Improve getRepliedMessage.
This commit is contained in:
parent
1d672470ea
commit
f6f94e5255
@ -4893,7 +4893,7 @@ getMessage chat_id:int53 message_id:int53 = Message;
|
||||
//@description Returns information about a message, if it is available without sending network request. This is an offline request @chat_id Identifier of the chat the message belongs to @message_id Identifier of the message to get
|
||||
getMessageLocally chat_id:int53 message_id:int53 = Message;
|
||||
|
||||
//@description Returns information about a message that is replied by a given message. Also returns the pinned message, the game message, and the invoice message for messages of the types messagePinMessage, messageGameScore, and messagePaymentSuccessful respectively
|
||||
//@description Returns information about a message that is replied by a given message. Also returns the pinned message, the game message, the invoice message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, and service topic messages respectively
|
||||
//@chat_id Identifier of the chat the message belongs to @message_id Identifier of the reply message
|
||||
getRepliedMessage chat_id:int53 message_id:int53 = Message;
|
||||
|
||||
|
@ -18446,6 +18446,9 @@ FullMessageId MessagesManager::get_replied_message_id(DialogId dialog_id, const
|
||||
return full_message_id;
|
||||
}
|
||||
if (m->reply_to_message_id == MessageId()) {
|
||||
if (m->top_thread_message_id.is_valid() && is_service_message_content(m->content->get_type())) {
|
||||
return {dialog_id, m->top_thread_message_id};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
return {m->reply_in_dialog_id.is_valid() ? m->reply_in_dialog_id : dialog_id, m->reply_to_message_id};
|
||||
|
Loading…
x
Reference in New Issue
Block a user