Support phrases for unclaimed giveaway prizes.

This commit is contained in:
John Preston
2023-10-28 21:26:56 +04:00
parent c480ab1a3b
commit fe0e526b79
9 changed files with 48 additions and 13 deletions

View File

@@ -1280,7 +1280,12 @@ auto HtmlWriter::Wrap::pushMessage(
+ wrapReplyToLink("the same background")
+ " for this chat";
}, [&](const ActionGiftCode &data) {
return data.viaGiveaway
return data.unclaimed
? ("This is an unclaimed Telegram Premium for "
+ NumberToString(data.months)
+ (data.months > 1 ? " months" : "month")
+ " prize in a giveaway organized by a channel.")
: data.viaGiveaway
? ("You won a Telegram Premium for "
+ NumberToString(data.months)
+ (data.months > 1 ? " months" : "month")