Remove FE0F from MessageDice emoji.

GitOrigin-RevId: b0eab642499ade40a17d9f5f475c73c7de71724e
This commit is contained in:
levlam 2020-07-21 01:35:35 +03:00
parent f32d92d374
commit e7ebc22929
2 changed files with 7 additions and 3 deletions

View File

@ -652,7 +652,8 @@ class MessageDice : public MessageContent {
MessageDice() = default;
MessageDice(string emoji, int32 dice_value)
: emoji(emoji.empty() ? string(DEFAULT_EMOJI) : std::move(emoji)), dice_value(dice_value) {
: emoji(emoji.empty() ? string(DEFAULT_EMOJI) : remove_emoji_modifiers(std::move(emoji)))
, dice_value(dice_value) {
}
MessageContentType get_type() const override {
@ -1280,7 +1281,9 @@ static void parse(unique_ptr<MessageContent> &content, ParserT &parser) {
case MessageContentType::Dice: {
auto m = make_unique<MessageDice>();
if (parser.version() >= static_cast<int32>(Version::AddDiceEmoji)) {
parse(m->emoji, parser);
string emoji;
parse(emoji, parser);
m->emoji = remove_emoji_modifiers(std::move(emoji));
} else {
m->emoji = MessageDice::DEFAULT_EMOJI;
}

View File

@ -3479,7 +3479,8 @@ void StickersManager::on_update_dice_success_values() {
return;
}
auto dice_success_values_str = G()->shared_config().get_option_string("dice_success_values", "0,6:62,5:110,0,0");
auto dice_success_values_str =
G()->shared_config().get_option_string("dice_success_values", "0,6:62,5:110,5:110,5:110");
if (dice_success_values_str == dice_success_values_str_) {
return;
}