Allow 0 as giveaway_message_id in messagePremiumGiveawayCompleted.
This commit is contained in:
parent
1a50ec474c
commit
dce778442c
@ -2901,7 +2901,7 @@ messagePremiumGiveawayCreated = MessageContent;
|
|||||||
messagePremiumGiveaway parameters:premiumGiveawayParameters winner_count:int32 month_count:int32 sticker:sticker = MessageContent;
|
messagePremiumGiveaway parameters:premiumGiveawayParameters winner_count:int32 month_count:int32 sticker:sticker = MessageContent;
|
||||||
|
|
||||||
//@description A Telegram Premium giveaway has been completed for the chat
|
//@description A Telegram Premium giveaway has been completed for the chat
|
||||||
//@giveaway_message_id Identifier of the message with the giveaway, can be an identifier of a deleted message
|
//@giveaway_message_id Identifier of the message with the giveaway; can be 0 if the message was deleted
|
||||||
//@winner_count Number of winners in the giveaway
|
//@winner_count Number of winners in the giveaway
|
||||||
//@unclaimed_prize_count Number of undistributed prizes
|
//@unclaimed_prize_count Number of undistributed prizes
|
||||||
messagePremiumGiveawayCompleted giveaway_message_id:int53 winner_count:int32 unclaimed_prize_count:int32 = MessageContent;
|
messagePremiumGiveawayCompleted giveaway_message_id:int53 winner_count:int32 unclaimed_prize_count:int32 = MessageContent;
|
||||||
|
@ -6403,10 +6403,8 @@ unique_ptr<MessageContent> get_action_message_content(Td *td, tl_object_ptr<tele
|
|||||||
case telegram_api::messageActionGiveawayResults::ID: {
|
case telegram_api::messageActionGiveawayResults::ID: {
|
||||||
auto action = move_tl_object_as<telegram_api::messageActionGiveawayResults>(action_ptr);
|
auto action = move_tl_object_as<telegram_api::messageActionGiveawayResults>(action_ptr);
|
||||||
auto reply_to_message_id = replied_message_info.get_same_chat_reply_to_message_id(true);
|
auto reply_to_message_id = replied_message_info.get_same_chat_reply_to_message_id(true);
|
||||||
if (!reply_to_message_id.is_valid()) {
|
if (!reply_to_message_id.is_valid() && reply_to_message_id != MessageId()) {
|
||||||
if (message_date >= 1700000000) { // approximate release date
|
|
||||||
LOG(ERROR) << "Receive giveaway results message with " << reply_to_message_id << " in " << owner_dialog_id;
|
LOG(ERROR) << "Receive giveaway results message with " << reply_to_message_id << " in " << owner_dialog_id;
|
||||||
}
|
|
||||||
reply_to_message_id = MessageId();
|
reply_to_message_id = MessageId();
|
||||||
}
|
}
|
||||||
return td::make_unique<MessageGiveawayResults>(reply_to_message_id, action->winners_count_,
|
return td::make_unique<MessageGiveawayResults>(reply_to_message_id, action->winners_count_,
|
||||||
|
Loading…
Reference in New Issue
Block a user