diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 89705be16..401a15388 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -3519,8 +3519,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_admin_log_participant_volume_channel" = "{from} changed live stream volume for {user} to {percent}"; "lng_admin_log_antispam_enabled" = "{from} enabled aggressive anti-spam"; "lng_admin_log_antispam_disabled" = "{from} disabled aggressive anti-spam"; -"lng_admin_log_change_color" = "{from} changed color"; -"lng_admin_log_change_background_emoji" = "{from} changed background emoji"; +"lng_admin_log_change_color" = "{from} changed channel color from {previous} to {color}"; +"lng_admin_log_set_background_emoji" = "{from} set channel background emoji to {emoji}"; +"lng_admin_log_change_background_emoji" = "{from} changed channel background emoji from {previous} to {emoji}"; +"lng_admin_log_removed_background_emoji" = "{from} removed channel background emoji {emoji}"; "lng_admin_log_user_with_username" = "{name} ({mention})"; "lng_admin_log_messages_ttl_set" = "{from} enabled messages auto-delete after {duration}"; "lng_admin_log_messages_ttl_changed" = "{from} changed messages auto-delete period from {previous} to {duration}"; diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp index dbac38ff5..df8819d10 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp @@ -1822,16 +1822,46 @@ void GenerateItems( tr::now, lt_from, fromLinkText, + lt_previous, + { '#' + QString::number(data.vprev_value().v + 1) }, + lt_color, + { '#' + QString::number(data.vnew_value().v + 1) }, Ui::Text::WithEntities); addSimpleServiceMessage(text); }; const auto createChangeBackgroundEmoji = [&](const LogChangeBackgroundEmoji &data) { - const auto text = tr::lng_admin_log_change_background_emoji( - tr::now, - lt_from, - fromLinkText, - Ui::Text::WithEntities); + const auto was = data.vprev_value().v; + const auto now = data.vnew_value().v; + const auto text = !was + ? tr::lng_admin_log_set_background_emoji( + tr::now, + lt_from, + fromLinkText, + lt_emoji, + Ui::Text::SingleCustomEmoji( + Data::SerializeCustomEmojiId(now)), + Ui::Text::WithEntities) + : !now + ? tr::lng_admin_log_removed_background_emoji( + tr::now, + lt_from, + fromLinkText, + lt_emoji, + Ui::Text::SingleCustomEmoji( + Data::SerializeCustomEmojiId(was)), + Ui::Text::WithEntities) + : tr::lng_admin_log_change_background_emoji( + tr::now, + lt_from, + fromLinkText, + lt_previous, + Ui::Text::SingleCustomEmoji( + Data::SerializeCustomEmojiId(was)), + lt_emoji, + Ui::Text::SingleCustomEmoji( + Data::SerializeCustomEmojiId(now)), + Ui::Text::WithEntities); addSimpleServiceMessage(text); };