Support messagePremiumGiveawayCompleted in getRepliedMessage.

This commit is contained in:
levlam 2023-12-04 12:34:58 +03:00
parent 9577a457c5
commit 99f9b78819
2 changed files with 10 additions and 2 deletions

View File

@ -6847,8 +6847,8 @@ getMessage chat_id:int53 message_id:int53 = Message;
getMessageLocally chat_id:int53 message_id:int53 = Message;
//@description Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message,
//-the message with a previously set same background, and the topic creation message for messages of the types
//-messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground and topic messages without non-bundled replied message respectively
//-the message with a previously set same background, the giveaway message, and the topic creation message for messages of the types
//-messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground, messagePremiumGiveawayCompleted and topic messages without non-bundled replied message respectively
//@chat_id Identifier of the chat the message belongs to
//@message_id Identifier of the reply message
getRepliedMessage chat_id:int53 message_id:int53 = Message;

View File

@ -3670,6 +3670,14 @@ MessageFullId get_message_content_replied_message_id(DialogId dialog_id, const M
return {dialog_id, m->old_message_id};
}
case MessageContentType::GiveawayResults: {
auto *m = static_cast<const MessageGiveawayResults *>(content);
if (!m->giveaway_message_id.is_valid()) {
return MessageFullId();
}
return {dialog_id, m->giveaway_message_id};
}
default:
return MessageFullId();
}