Add pushMessageContentChatSetBackground.

This commit is contained in:
levlam 2023-04-10 15:14:03 +03:00
parent 0823c902bd
commit 10562f5bac
3 changed files with 19 additions and 0 deletions

View File

@ -4272,6 +4272,9 @@ pushMessageContentChatChangePhoto = PushMessageContent;
//@description A chat title was edited @title New chat title //@description A chat title was edited @title New chat title
pushMessageContentChatChangeTitle title:string = PushMessageContent; pushMessageContentChatChangeTitle title:string = PushMessageContent;
//@description A chat background was edited @is_same True, if the set background is the same as the background of the current user
pushMessageContentChatSetBackground is_same:Bool = PushMessageContent;
//@description A chat theme was edited @theme_name If non-empty, name of a new theme, set for the chat. Otherwise, the chat theme was reset to the default one //@description A chat theme was edited @theme_name If non-empty, name of a new theme, set for the chat. Otherwise, the chat theme was reset to the default one
pushMessageContentChatSetTheme theme_name:string = PushMessageContent; pushMessageContentChatSetTheme theme_name:string = PushMessageContent;

View File

@ -2909,6 +2909,9 @@ string NotificationManager::convert_loc_key(const string &loc_key) {
} }
break; break;
case 'S': case 'S':
if (loc_key == "MESSAGE_SAME_WALLPAPER") {
return "MESSAGE_SAME_WALLPAPER";
}
if (loc_key == "MESSAGE_SCREENSHOT") { if (loc_key == "MESSAGE_SCREENSHOT") {
return "MESSAGE_SCREENSHOT_TAKEN"; return "MESSAGE_SCREENSHOT_TAKEN";
} }
@ -2958,6 +2961,11 @@ string NotificationManager::convert_loc_key(const string &loc_key) {
return "MESSAGE_SECRET_VIDEO"; return "MESSAGE_SECRET_VIDEO";
} }
break; break;
case 'W':
if (loc_key == "MESSAGE_WALLPAPER") {
return "MESSAGE_WALLPAPER";
}
break;
case '_': case '_':
if (loc_key == "CHAT_ADD_MEMBER") { if (loc_key == "CHAT_ADD_MEMBER") {
return "MESSAGE_CHAT_ADD_MEMBERS"; return "MESSAGE_CHAT_ADD_MEMBERS";

View File

@ -296,6 +296,9 @@ class NotificationTypePushMessage final : public NotificationType {
} }
break; break;
case 'S': case 'S':
if (key == "MESSAGE_SAME_WALLPAPER") {
return td_api::make_object<td_api::pushMessageContentChatSetBackground>(true);
}
if (key == "MESSAGE_SCREENSHOT_TAKEN") { if (key == "MESSAGE_SCREENSHOT_TAKEN") {
return td_api::make_object<td_api::pushMessageContentScreenshotTaken>(); return td_api::make_object<td_api::pushMessageContentScreenshotTaken>();
} }
@ -340,6 +343,11 @@ class NotificationTypePushMessage final : public NotificationType {
voice_notes_manager->get_voice_note_object(document.file_id), is_pinned); voice_notes_manager->get_voice_note_object(document.file_id), is_pinned);
} }
break; break;
case 'W':
if (key == "MESSAGE_WALLPAPER") {
return td_api::make_object<td_api::pushMessageContentChatSetBackground>(false);
}
break;
default: default:
break; break;
} }