diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 763784573..794a3e3b7 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -4782,6 +4782,9 @@ pushMessageContentPhoto photo:photo caption:string is_secret:Bool is_pinned:Bool //@is_pinned True, if the message is a pinned message with the specified content pushMessageContentPoll question:string is_regular:Bool is_pinned:Bool = PushMessageContent; +//@description A message with a Telegram Premium gift code created for the user @month_count Number of month the Telegram Premium subscription will be active after code activation +pushMessageContentPremiumGiftCode month_count:int32 = PushMessageContent; + //@description A screenshot of a message in the chat has been taken pushMessageContentScreenshotTaken = PushMessageContent; diff --git a/td/telegram/NotificationManager.cpp b/td/telegram/NotificationManager.cpp index fd75a51a2..7ce8e4c3b 100644 --- a/td/telegram/NotificationManager.cpp +++ b/td/telegram/NotificationManager.cpp @@ -2887,6 +2887,9 @@ string NotificationManager::convert_loc_key(const string &loc_key) { if (loc_key == "MESSAGE_GIF") { return "MESSAGE_ANIMATION"; } + if (loc_key == "MESSAGE_GIFTCODE") { + return "MESSAGE_GIFTCODE"; + } break; case 'H': if (loc_key == "PINNED_PHOTO") { diff --git a/td/telegram/NotificationType.cpp b/td/telegram/NotificationType.cpp index 09e85a66b..285b59b27 100644 --- a/td/telegram/NotificationType.cpp +++ b/td/telegram/NotificationType.cpp @@ -254,6 +254,10 @@ class NotificationTypePushMessage final : public NotificationType { } return td_api::make_object(title, score, is_pinned); } + if (key == "MESSAGE_GIFTCODE") { + int32 month_count = to_integer(arg); + return td_api::make_object(month_count); + } break; case 'I': if (key == "MESSAGE_INVOICE") {