diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 99e7b15fc29f..f8ac96b72ad9 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -2230,8 +2230,8 @@ pushMessageContentLocation is_live:Bool is_pinned:Bool = PushMessageContent; //@description A photo message @photo Message content; may be null @caption Photo caption @is_secret True, if the photo is secret @is_pinned True, if the message is a pinned message with the specified content pushMessageContentPhoto photo:photo caption:string is_secret:Bool is_pinned:Bool = PushMessageContent; -//@description A message with a poll @question Poll question @is_pinned True, if the message is a pinned message with the specified content -pushMessageContentPoll question:string is_pinned:Bool = PushMessageContent; +//@description A message with a poll @question Poll question @is_regular True, if the poll is regular and not in quiz mode @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 screenshot of a message in the chat has been taken pushMessageContentScreenshotTaken = PushMessageContent; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index 52fb14d0a460..87956b8a7437 100644 Binary files a/td/generate/scheme/td_api.tlo and b/td/generate/scheme/td_api.tlo differ diff --git a/td/telegram/NotificationManager.cpp b/td/telegram/NotificationManager.cpp index 252f01d854c5..6153b875caf4 100644 --- a/td/telegram/NotificationManager.cpp +++ b/td/telegram/NotificationManager.cpp @@ -2833,6 +2833,11 @@ string NotificationManager::convert_loc_key(const string &loc_key) { return "MESSAGE_POLL"; } break; + case 'Q': + if (loc_key == "MESSAGE_QUIZ") { + return "MESSAGE_QUIZ"; + } + break; case 'R': if (loc_key == "MESSAGE_ROUND") { return "MESSAGE_VIDEO_NOTE"; @@ -2864,6 +2869,9 @@ string NotificationManager::convert_loc_key(const string &loc_key) { if (loc_key == "PINNED_AUDIO") { return "PINNED_MESSAGE_VOICE_NOTE"; } + if (loc_key == "PINNED_QUIZ") { + return "PINNED_MESSAGE_QUIZ"; + } if (loc_key == "CHAT_RETURNED") { return "MESSAGE_CHAT_ADD_MEMBERS_RETURNED"; } diff --git a/td/telegram/NotificationType.cpp b/td/telegram/NotificationType.cpp index 03569310feba..798578acfd6c 100644 --- a/td/telegram/NotificationType.cpp +++ b/td/telegram/NotificationType.cpp @@ -262,7 +262,12 @@ class NotificationTypePushMessage : public NotificationType { return td_api::make_object(to_integer(arg), true, false); } if (key == "MESSAGE_POLL") { - return td_api::make_object(arg, is_pinned); + return td_api::make_object(arg, true, is_pinned); + } + break; + case 'Q': + if (key == "MESSAGE_QUIZ") { + return td_api::make_object(arg, false, is_pinned); } break; case 'S':