From 87e97ad533b5ce54364b0c972088b208d903741f Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 29 Dec 2021 14:24:54 +0300 Subject: [PATCH] Add admin event log phrases about reactions. --- Telegram/Resources/langs/lang.strings | 2 ++ .../history/admin_log/history_admin_log_item.cpp | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index a0da8a5a9..3ad932465 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -2585,6 +2585,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "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}"; "lng_admin_log_messages_ttl_removed" = "{from} disabled messages auto-deletion after {duration}"; +"lng_admin_log_reactions_disabled" = "{from} disabled reactions"; +"lng_admin_log_reactions_updated" = "{from} updated the list of allowed reactions to: {emoji}"; "lng_admin_log_edited_invite_link" = "edited invite link {link}"; "lng_admin_log_invite_link_expire_date" = "Expire date: {previous} -> {limit}"; "lng_admin_log_invite_link_usage_limit" = "Usage limit: {previous} -> {limit}"; 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 dd7bec909..cf96d1eb9 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp @@ -1372,7 +1372,14 @@ void GenerateItems( }; const auto createChangeAvailableReactions = [&](const LogEventActionChangeAvailableReactions &data) { - // #TODO reactions + auto list = QStringList(); + for (const auto &emoji : data.vnew_value().v) { + list.append(qs(emoji)); + } + const auto text = list.isEmpty() + ? tr::lng_admin_log_reactions_disabled(tr::now, lt_from, fromLinkText) + : tr::lng_admin_log_reactions_updated(tr::now, lt_from, fromLinkText, lt_emoji, list.join(", ")); + addSimpleServiceMessage(text); }; action.match([&](const LogTitle &data) {