From f5db9e48e74e36ca03615a9ac8e4542b66417989 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 21 Nov 2019 20:22:05 +0300 Subject: [PATCH] Add animated_emojis_sticker_set_name option. GitOrigin-RevId: 22b7bd84436ad2a8deb5388dc9434f98afbb880f --- td/telegram/StickersManager.cpp | 16 ++++++++++++++++ td/telegram/Td.cpp | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index fbee4de4a..1ad0558c7 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -1035,6 +1035,22 @@ StickersManager::StickersManager(Td *td, ActorShared<> parent) : td_(td), parent on_update_recent_stickers_limit(G()->shared_config().get_option_integer("recent_stickers_limit", 200)); on_update_favorite_stickers_limit(G()->shared_config().get_option_integer("favorite_stickers_limit", 5)); + + // add animated emoji sticker set + StickerSetId sticker_set_id; + int64 access_hash = 0; + string sticker_set_name; + if (G()->is_test_dc()) { + sticker_set_id = StickerSetId(1258816259751954); + access_hash = 4879754868529595811; + sticker_set_name = "emojies"; + } else { + sticker_set_id = StickerSetId(1258816259751983); + access_hash = 5100237018658464041; + sticker_set_name = "animatedemojies"; + } + add_sticker_set(sticker_set_id, access_hash); + short_name_to_sticker_set_id_.emplace(sticker_set_name, sticker_set_id); } void StickersManager::tear_down() { diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 94ffa486d..8e1dd62a3 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -4427,6 +4427,10 @@ void Td::init_options_and_network() { if (!G()->shared_config().have_option("message_caption_length_max")) { G()->shared_config().set_option_integer("message_caption_length_max", 1024); } + if (!G()->shared_config().have_option("animated_emojis_sticker_set_name")) { + G()->shared_config().set_option_string("animated_emojis_sticker_set_name", + G()->is_test_dc() ? Slice("emojies") : Slice("AnimatedEmojies")); + } init_connection_creator();