diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index 4fb827b6..0d8d7344 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -1291,7 +1291,7 @@ void ConfigManager::process_app_config(tl_object_ptr &c string wallet_blockchain_name; string wallet_config; string ignored_restriction_reasons; - string dice_emojis; + vector dice_emojis; string dice_success_values; if (config->get_id() == telegram_api::jsonObject::ID) { for (auto &key_value : static_cast(config.get())->value_) { @@ -1348,10 +1348,7 @@ void ConfigManager::process_app_config(tl_object_ptr &c if (emoji->get_id() == telegram_api::jsonString::ID) { Slice emoji_text = static_cast(emoji.get())->value_; if (!emoji_text.empty()) { - if (!dice_emojis.empty()) { - dice_emojis += '\x01'; - } - dice_emojis.append(emoji_text.begin(), emoji_text.end()); + dice_emojis.push_back(emoji_text.str()); } else { LOG(ERROR) << "Receive empty dice emoji"; } @@ -1416,7 +1413,7 @@ void ConfigManager::process_app_config(tl_object_ptr &c } if (!dice_emojis.empty()) { - shared_config.set_option_string("dice_emojis", dice_emojis); + shared_config.set_option_string("dice_emojis", implode(dice_emojis, '\x01')); } if (!dice_success_values.empty()) { shared_config.set_option_string("dice_success_values", dice_success_values);