Improve premiumGiftCodeInfo.giveaway_message_id.
This commit is contained in:
parent
718d8dfdef
commit
d24af0436f
@ -699,7 +699,7 @@ premiumGiftCodePaymentOptions options:vector<premiumGiftCodePaymentOption> = Pre
|
||||
//@creator_id Identifier of a chat or a user that created the gift code
|
||||
//@creation_date Point in time (Unix timestamp) when the code was created
|
||||
//@is_from_giveaway True, if the gift code was created for a giveaway
|
||||
//@giveaway_message_id Identifier of the corresponding giveaway message; can be 0 or an identifier of a deleted message
|
||||
//@giveaway_message_id Identifier of the corresponding giveaway message in the creator_id chat; can be 0 or an identifier of a deleted message
|
||||
//@month_count Number of month the Telegram Premium subscription will be active after code activation
|
||||
//@user_id Identifier of a user for which the code was created; 0 if none
|
||||
//@use_date Point in time (Unix timestamp) when the code was activated; 0 if none
|
||||
|
@ -341,6 +341,10 @@ class CheckGiftCodeQuery final : public Td::ResultHandler {
|
||||
LOG(ERROR) << "Receive " << to_string(result);
|
||||
message_id = MessageId();
|
||||
}
|
||||
if (message_id != MessageId() && creator_dialog_id.get_type() != DialogType::Channel) {
|
||||
LOG(ERROR) << "Receive " << to_string(result);
|
||||
message_id = MessageId();
|
||||
}
|
||||
promise_.set_value(td_api::make_object<td_api::premiumGiftCodeInfo>(
|
||||
get_message_sender_object(td_, creator_dialog_id, "premiumGiftCodeInfo"), result->date_, result->via_giveaway_,
|
||||
message_id.get(), result->months_, td_->contacts_manager_->get_user_id_object(user_id, "premiumGiftCodeInfo"),
|
||||
|
Loading…
Reference in New Issue
Block a user