aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/StarGift.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2025-09-08 19:44:17 +0300
committerlevlam <levlam@telegram.org>2025-09-08 19:44:17 +0300
commitb993d4c92e058ff535f9dd4450c24d1a879db516 (patch)
tree93b53e83ff3670eabf84486d4275e303acd9cab4 /td/telegram/StarGift.cpp
parent291d6b0d4400f666c089a84c0bdc17102c420985 (diff)
Add upgradedGift.value_currency/value_amount.
Diffstat (limited to 'td/telegram/StarGift.cpp')
-rw-r--r--td/telegram/StarGift.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/td/telegram/StarGift.cpp b/td/telegram/StarGift.cpp
index 69513c1a8..0bc19b9ce 100644
--- a/td/telegram/StarGift.cpp
+++ b/td/telegram/StarGift.cpp
@@ -120,6 +120,8 @@ StarGift::StarGift(Td *td, telegram_api::object_ptr<telegram_api::StarGift> &&st
UNREACHABLE();
}
}
+ value_currency_ = std::move(star_gift->value_currency_);
+ value_amount_ = star_gift->value_amount_;
return;
}
if (constructor_id != telegram_api::starGift::ID) {
@@ -193,7 +195,8 @@ td_api::object_ptr<td_api::upgradedGift> StarGift::get_upgraded_gift_object(Td *
!owner_dialog_id_.is_valid() ? nullptr : get_message_sender_object(td, owner_dialog_id_, "upgradedGift"),
owner_address_, owner_name_, gift_address_, model_.get_upgraded_gift_model_object(td),
pattern_.get_upgraded_gift_symbol_object(td), backdrop_.get_upgraded_gift_backdrop_object(),
- original_details_.get_upgraded_gift_original_details_object(td), std::move(resale_parameters));
+ original_details_.get_upgraded_gift_original_details_object(td), std::move(resale_parameters), value_currency_,
+ value_amount_);
}
td_api::object_ptr<td_api::giftForResale> StarGift::get_gift_for_resale_object(Td *td) const {
@@ -234,7 +237,8 @@ bool operator==(const StarGift &lhs, const StarGift &rhs) {
lhs.unique_availability_total_ == rhs.unique_availability_total_ &&
lhs.resale_star_count_ == rhs.resale_star_count_ && lhs.released_by_dialog_id_ == rhs.released_by_dialog_id_ &&
lhs.is_premium_ == rhs.is_premium_ && lhs.per_user_remains_ == rhs.per_user_remains_ &&
- lhs.per_user_total_ == rhs.per_user_total_ && lhs.regular_gift_id_ == rhs.regular_gift_id_;
+ lhs.per_user_total_ == rhs.per_user_total_ && lhs.regular_gift_id_ == rhs.regular_gift_id_ &&
+ lhs.value_currency_ == rhs.value_currency_ && lhs.value_amount_ == rhs.value_amount_;
}
StringBuilder &operator<<(StringBuilder &string_builder, const StarGift &star_gift) {