From 07be10f6f9d7784c3657ccbaf9054881655cdc71 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 21 Apr 2020 20:12:35 +0300 Subject: [PATCH] Delete dice options for bots. GitOrigin-RevId: f52bc6629d7befc1ab9eabcaabcc4346b7d23db1 --- td/telegram/StickersManager.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index 97f0b625..fc30cbe8 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -3376,6 +3376,14 @@ td_api::object_ptr StickersManager::get_update_dice_em } void StickersManager::on_update_dice_emojis() { + if (G()->close_flag()) { + return; + } + if (td_->auth_manager_->is_bot()) { + G()->shared_config().set_option_empty("dice_emojis"); + return; + } + auto dice_emojis_str = G()->shared_config().get_option_string("dice_emojis", "🎲\x01🎯"); if (dice_emojis_str == dice_emojis_str_) { return; @@ -3387,6 +3395,14 @@ void StickersManager::on_update_dice_emojis() { } void StickersManager::on_update_dice_success_values() { + if (G()->close_flag()) { + return; + } + if (td_->auth_manager_->is_bot()) { + G()->shared_config().set_option_empty("dice_success_values"); + return; + } + auto dice_success_values_str = G()->shared_config().get_option_string("dice_success_values", "0,0"); if (dice_success_values_str == dice_success_values_str_) { return;