Add td_api::pushMessageContentStory.

This commit is contained in:
levlam 2023-06-22 21:18:04 +03:00
parent 10c44c0cbf
commit b151c1b8b2
3 changed files with 12 additions and 0 deletions

View File

@ -4301,6 +4301,9 @@ pushMessageContentScreenshotTaken = PushMessageContent;
//@is_pinned True, if the message is a pinned message with the specified content //@is_pinned True, if the message is a pinned message with the specified content
pushMessageContentSticker sticker:sticker emoji:string is_pinned:Bool = PushMessageContent; pushMessageContentSticker sticker:sticker emoji:string is_pinned:Bool = PushMessageContent;
//@description A message with a story @is_pinned True, if the message is a pinned message with the specified content
pushMessageContentStory is_pinned:Bool = PushMessageContent;
//@description A text message @text Message text @is_pinned True, if the message is a pinned message with the specified content //@description A text message @text Message text @is_pinned True, if the message is a pinned message with the specified content
pushMessageContentText text:string is_pinned:Bool = PushMessageContent; pushMessageContentText text:string is_pinned:Bool = PushMessageContent;

View File

@ -2929,6 +2929,9 @@ string NotificationManager::convert_loc_key(const string &loc_key) {
if (loc_key == "MESSAGE_STICKER") { if (loc_key == "MESSAGE_STICKER") {
return "MESSAGE_STICKER"; return "MESSAGE_STICKER";
} }
if (loc_key == "MESSAGE_STORY") {
return "MESSAGE_STORY";
}
if (loc_key == "MESSAGE_SUGGEST_PHOTO") { if (loc_key == "MESSAGE_SUGGEST_PHOTO") {
return "MESSAGE_SUGGEST_PHOTO"; return "MESSAGE_SUGGEST_PHOTO";
} }
@ -2943,6 +2946,9 @@ string NotificationManager::convert_loc_key(const string &loc_key) {
if (loc_key == "PINNED_STICKER") { if (loc_key == "PINNED_STICKER") {
return "PINNED_MESSAGE_STICKER"; return "PINNED_MESSAGE_STICKER";
} }
if (loc_key == "PINNED_STORY") {
return "PINNED_MESSAGE_STORY";
}
if (loc_key == "CHAT_PHOTO_EDITED") { if (loc_key == "CHAT_PHOTO_EDITED") {
return "MESSAGE_CHAT_CHANGE_PHOTO"; return "MESSAGE_CHAT_CHANGE_PHOTO";
} }

View File

@ -313,6 +313,9 @@ class NotificationTypePushMessage final : public NotificationType {
return td_api::make_object<td_api::pushMessageContentSticker>( return td_api::make_object<td_api::pushMessageContentSticker>(
stickers_manager->get_sticker_object(document.file_id), trim(arg), is_pinned); stickers_manager->get_sticker_object(document.file_id), trim(arg), is_pinned);
} }
if (key == "MESSAGE_STORY") {
return td_api::make_object<td_api::pushMessageContentStory>(is_pinned);
}
if (key == "MESSAGE_SUGGEST_PHOTO") { if (key == "MESSAGE_SUGGEST_PHOTO") {
return td_api::make_object<td_api::pushMessageContentSuggestProfilePhoto>(); return td_api::make_object<td_api::pushMessageContentSuggestProfilePhoto>();
} }