diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 7272c4b4b..a10dac90c 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -2901,7 +2901,7 @@ messagePremiumGiveawayCreated = MessageContent; messagePremiumGiveaway parameters:premiumGiveawayParameters winner_count:int32 month_count:int32 sticker:sticker = MessageContent; //@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 //@unclaimed_prize_count Number of undistributed prizes messagePremiumGiveawayCompleted giveaway_message_id:int53 winner_count:int32 unclaimed_prize_count:int32 = MessageContent; diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index c07e821eb..b21fba4ed 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -6403,10 +6403,8 @@ unique_ptr get_action_message_content(Td *td, tl_object_ptr(action_ptr); auto reply_to_message_id = replied_message_info.get_same_chat_reply_to_message_id(true); - if (!reply_to_message_id.is_valid()) { - if (message_date >= 1700000000) { // approximate release date - LOG(ERROR) << "Receive giveaway results message with " << reply_to_message_id << " in " << owner_dialog_id; - } + if (!reply_to_message_id.is_valid() && reply_to_message_id != MessageId()) { + LOG(ERROR) << "Receive giveaway results message with " << reply_to_message_id << " in " << owner_dialog_id; reply_to_message_id = MessageId(); } return td::make_unique(reply_to_message_id, action->winners_count_,