Add pushMessageContentSuggestProfilePhoto.

This commit is contained in:
levlam 2022-12-25 21:29:56 +03:00
parent ea30ec106c
commit 9768637010
3 changed files with 12 additions and 3 deletions

View File

@ -4049,6 +4049,9 @@ pushMessageContentChatJoinByRequest = PushMessageContent;
//@description A new recurrent payment was made by the current user @amount The paid amount //@description A new recurrent payment was made by the current user @amount The paid amount
pushMessageContentRecurringPayment amount:string = PushMessageContent; pushMessageContentRecurringPayment amount:string = PushMessageContent;
//@description A profile photo was suggested to the user
pushMessageContentSuggestProfilePhoto = PushMessageContent;
//@description A forwarded messages @total_count Number of forwarded messages //@description A forwarded messages @total_count Number of forwarded messages
pushMessageContentMessageForwards total_count:int32 = PushMessageContent; pushMessageContentMessageForwards total_count:int32 = PushMessageContent;

View File

@ -2898,6 +2898,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_SUGGEST_PHOTO") {
return "MESSAGE_SUGGEST_PHOTO";
}
break; break;
case 'T': case 'T':
if (loc_key == "CHAT_LEFT") { if (loc_key == "CHAT_LEFT") {

View File

@ -296,20 +296,23 @@ class NotificationTypePushMessage final : public NotificationType {
} }
break; break;
case 'S': case 'S':
if (key == "MESSAGE_SCREENSHOT_TAKEN") {
return td_api::make_object<td_api::pushMessageContentScreenshotTaken>();
}
if (key == "MESSAGE_SECRET_PHOTO") { if (key == "MESSAGE_SECRET_PHOTO") {
return td_api::make_object<td_api::pushMessageContentPhoto>(nullptr, arg, true, false); return td_api::make_object<td_api::pushMessageContentPhoto>(nullptr, arg, true, false);
} }
if (key == "MESSAGE_SECRET_VIDEO") { if (key == "MESSAGE_SECRET_VIDEO") {
return td_api::make_object<td_api::pushMessageContentVideo>(nullptr, arg, true, false); return td_api::make_object<td_api::pushMessageContentVideo>(nullptr, arg, true, false);
} }
if (key == "MESSAGE_SCREENSHOT_TAKEN") {
return td_api::make_object<td_api::pushMessageContentScreenshotTaken>();
}
if (key == "MESSAGE_STICKER") { if (key == "MESSAGE_STICKER") {
auto stickers_manager = G()->td().get_actor_unsafe()->stickers_manager_.get(); auto stickers_manager = G()->td().get_actor_unsafe()->stickers_manager_.get();
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_SUGGEST_PHOTO") {
return td_api::make_object<td_api::pushMessageContentSuggestProfilePhoto>();
}
break; break;
case 'T': case 'T':
if (key == "MESSAGE_TEXT") { if (key == "MESSAGE_TEXT") {