Support QUIZ push notifications.
GitOrigin-RevId: 34e2e7c364b2670861900ce8371534d0ab368afb
This commit is contained in:
parent
b272cf02ba
commit
e6b209fb72
@ -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;
|
||||
|
Binary file not shown.
@ -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";
|
||||
}
|
||||
|
@ -262,7 +262,12 @@ class NotificationTypePushMessage : public NotificationType {
|
||||
return td_api::make_object<td_api::pushMessageContentMediaAlbum>(to_integer<int32>(arg), true, false);
|
||||
}
|
||||
if (key == "MESSAGE_POLL") {
|
||||
return td_api::make_object<td_api::pushMessageContentPoll>(arg, is_pinned);
|
||||
return td_api::make_object<td_api::pushMessageContentPoll>(arg, true, is_pinned);
|
||||
}
|
||||
break;
|
||||
case 'Q':
|
||||
if (key == "MESSAGE_QUIZ") {
|
||||
return td_api::make_object<td_api::pushMessageContentPoll>(arg, false, is_pinned);
|
||||
}
|
||||
break;
|
||||
case 'S':
|
||||
|
Loading…
Reference in New Issue
Block a user