Add td_api::emojiCategoryTypeCombined.
This commit is contained in:
parent
cae81ef90a
commit
ee57967e6b
@ -3726,6 +3726,9 @@ emojiCategoryTypeEmojiStatus = EmojiCategoryType;
|
||||
//@description The category must be used for chat photo emoji selection
|
||||
emojiCategoryTypeChatPhoto = EmojiCategoryType;
|
||||
|
||||
//@description The category containing greeting emoji and Premium stickers that emust be used for start page sticker selection
|
||||
emojiCategoryTypeCombined = EmojiCategoryType;
|
||||
|
||||
|
||||
//@description Describes position of a clickable rectangle area on a story media
|
||||
//@x_percentage The abscissa of the rectangle's center, as a percentage of the media width
|
||||
|
@ -19,6 +19,8 @@ EmojiGroupType get_emoji_group_type(const td_api::object_ptr<td_api::EmojiCatego
|
||||
return EmojiGroupType::EmojiStatus;
|
||||
case td_api::emojiCategoryTypeChatPhoto::ID:
|
||||
return EmojiGroupType::ProfilePhoto;
|
||||
case td_api::emojiCategoryTypeCombined::ID:
|
||||
return EmojiGroupType::Combined;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return EmojiGroupType::Default;
|
||||
@ -33,6 +35,8 @@ StringBuilder &operator<<(StringBuilder &string_builder, EmojiGroupType emoji_gr
|
||||
return string_builder << "EmojiStatus";
|
||||
case EmojiGroupType::ProfilePhoto:
|
||||
return string_builder << "ChatPhoto";
|
||||
case EmojiGroupType::Combined:
|
||||
return string_builder << "Combined";
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return string_builder;
|
||||
|
@ -13,9 +13,9 @@
|
||||
|
||||
namespace td {
|
||||
|
||||
enum class EmojiGroupType : int32 { Default, EmojiStatus, ProfilePhoto };
|
||||
enum class EmojiGroupType : int32 { Default, EmojiStatus, ProfilePhoto, Combined };
|
||||
|
||||
static constexpr int32 MAX_EMOJI_GROUP_TYPE = 3;
|
||||
static constexpr int32 MAX_EMOJI_GROUP_TYPE = 4;
|
||||
|
||||
EmojiGroupType get_emoji_group_type(const td_api::object_ptr<td_api::EmojiCategoryType> &type);
|
||||
|
||||
|
@ -1463,6 +1463,9 @@ class GetEmojiGroupsQuery final : public Td::ResultHandler {
|
||||
case EmojiGroupType::ProfilePhoto:
|
||||
send_query(G()->net_query_creator().create(telegram_api::messages_getEmojiProfilePhotoGroups(hash)));
|
||||
break;
|
||||
case EmojiGroupType::Combined:
|
||||
send_query(G()->net_query_creator().create(telegram_api::messages_getEmojiStickerGroups(hash)));
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
@ -1475,6 +1478,9 @@ class GetEmojiGroupsQuery final : public Td::ResultHandler {
|
||||
static_assert(std::is_same<telegram_api::messages_getEmojiGroups::ReturnType,
|
||||
telegram_api::messages_getEmojiProfilePhotoGroups::ReturnType>::value,
|
||||
"");
|
||||
static_assert(std::is_same<telegram_api::messages_getEmojiGroups::ReturnType,
|
||||
telegram_api::messages_getEmojiStickerGroups::ReturnType>::value,
|
||||
"");
|
||||
auto result_ptr = fetch_result<telegram_api::messages_getEmojiGroups>(packet);
|
||||
if (result_ptr.is_error()) {
|
||||
return on_error(result_ptr.move_as_error());
|
||||
|
@ -3632,7 +3632,7 @@ class CliClient final : public Actor {
|
||||
send_request(td_api::make_object<td_api::getKeywordEmojis>(args, vector<string>()));
|
||||
} else if (op == "gkeru") {
|
||||
send_request(td_api::make_object<td_api::getKeywordEmojis>(args, vector<string>{"ru_RU"}));
|
||||
} else if (op == "gec" || op == "geces" || op == "geccp") {
|
||||
} else if (op == "gec" || op == "geces" || op == "geccp" || op == "gecc") {
|
||||
auto type = [&]() -> td_api::object_ptr<td_api::EmojiCategoryType> {
|
||||
if (op == "geces") {
|
||||
return td_api::make_object<td_api::emojiCategoryTypeEmojiStatus>();
|
||||
@ -3640,6 +3640,9 @@ class CliClient final : public Actor {
|
||||
if (op == "geccp") {
|
||||
return td_api::make_object<td_api::emojiCategoryTypeChatPhoto>();
|
||||
}
|
||||
if (op == "gecc") {
|
||||
return td_api::make_object<td_api::emojiCategoryTypeCombined>();
|
||||
}
|
||||
return td_api::make_object<td_api::emojiCategoryTypeDefault>();
|
||||
}();
|
||||
send_request(td_api::make_object<td_api::getEmojiCategories>(std::move(type)));
|
||||
|
Loading…
Reference in New Issue
Block a user