Add InputInvoice::update_from.
This commit is contained in:
parent
92f9f8bdd0
commit
6a5989eb8b
|
@ -379,6 +379,10 @@ FileId InputInvoice::get_thumbnail_file_id(const Td *td) const {
|
|||
return extended_media_.get_thumbnail_file_id(td);
|
||||
}
|
||||
|
||||
void InputInvoice::update_from(const InputInvoice &old_input_invoice) {
|
||||
extended_media_.update_from(old_input_invoice.extended_media_);
|
||||
}
|
||||
|
||||
bool InputInvoice::update_extended_media(telegram_api::object_ptr<telegram_api::MessageExtendedMedia> extended_media,
|
||||
DialogId owner_dialog_id, Td *td) {
|
||||
return extended_media_.update_to(td, std::move(extended_media), owner_dialog_id);
|
||||
|
|
|
@ -95,6 +95,8 @@ struct InputInvoice {
|
|||
|
||||
FileId get_thumbnail_file_id(const Td *td) const;
|
||||
|
||||
void update_from(const InputInvoice &old_input_invoice);
|
||||
|
||||
bool update_extended_media(telegram_api::object_ptr<telegram_api::MessageExtendedMedia> extended_media,
|
||||
DialogId owner_dialog_id, Td *td);
|
||||
|
||||
|
|
|
@ -3222,7 +3222,7 @@ void merge_message_contents(Td *td, const MessageContent *old_content, MessageCo
|
|||
case MessageContentType::Invoice: {
|
||||
const auto *old_ = static_cast<const MessageInvoice *>(old_content);
|
||||
auto *new_ = static_cast<MessageInvoice *>(new_content);
|
||||
new_->input_invoice.extended_media_.update_from(old_->input_invoice.extended_media_);
|
||||
new_->input_invoice.update_from(old_->input_invoice);
|
||||
if (old_->input_invoice != new_->input_invoice) {
|
||||
need_update = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user