Add RepliedMessageInfo::legacy static function instead of legacy constructors.
This commit is contained in:
parent
e9bf274f33
commit
aba3f38a2f
@ -5174,7 +5174,7 @@ void MessagesManager::Message::parse(ParserT &parser) {
|
|||||||
if (has_replied_message_info) {
|
if (has_replied_message_info) {
|
||||||
parse(replied_message_info, parser);
|
parse(replied_message_info, parser);
|
||||||
} else {
|
} else {
|
||||||
replied_message_info = RepliedMessageInfo(legacy_reply_to_message_id, legacy_reply_in_dialog_id);
|
replied_message_info = RepliedMessageInfo::legacy(legacy_reply_to_message_id, legacy_reply_in_dialog_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECK(content != nullptr);
|
CHECK(content != nullptr);
|
||||||
@ -14072,7 +14072,7 @@ void MessagesManager::on_get_secret_message(SecretChatId secret_chat_id, UserId
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
message_info.reply_header.replied_message_info_ = RepliedMessageInfo(reply_to_message_id);
|
message_info.reply_header.replied_message_info_ = RepliedMessageInfo::legacy(reply_to_message_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!clean_input_string(message->via_bot_name_)) {
|
if (!clean_input_string(message->via_bot_name_)) {
|
||||||
|
@ -51,11 +51,11 @@ class RepliedMessageInfo {
|
|||||||
RepliedMessageInfo &operator=(RepliedMessageInfo &&) = default;
|
RepliedMessageInfo &operator=(RepliedMessageInfo &&) = default;
|
||||||
~RepliedMessageInfo();
|
~RepliedMessageInfo();
|
||||||
|
|
||||||
explicit RepliedMessageInfo(MessageId reply_to_message_id) : message_id_(reply_to_message_id) {
|
static RepliedMessageInfo legacy(MessageId reply_to_message_id, DialogId reply_in_dialog_id = DialogId()) {
|
||||||
}
|
RepliedMessageInfo result;
|
||||||
|
result.message_id_ = reply_to_message_id;
|
||||||
RepliedMessageInfo(MessageId reply_to_message_id, DialogId reply_in_dialog_id)
|
result.dialog_id_ = reply_in_dialog_id;
|
||||||
: message_id_(reply_to_message_id), dialog_id_(reply_in_dialog_id) {
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
RepliedMessageInfo(Td *td, tl_object_ptr<telegram_api::messageReplyHeader> &&reply_header, DialogId dialog_id,
|
RepliedMessageInfo(Td *td, tl_object_ptr<telegram_api::messageReplyHeader> &&reply_header, DialogId dialog_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user