diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index ef3c04fb82..d0d0c79e29 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -6159,6 +6159,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_admin_log_stopped_poll" = "{from} stopped poll:"; "lng_admin_log_invited" = "invited {user}"; "lng_admin_log_banned" = "banned {user}"; +"lng_admin_log_banned_until" = "banned {user} {until}"; "lng_admin_log_unbanned" = "unbanned {user}"; "lng_admin_log_restricted" = "changed restrictions for {user} {until}"; "lng_admin_log_promoted" = "changed privileges for {user}"; 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 0971959fab..3273370e7b 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp @@ -354,10 +354,23 @@ TextWithEntities GeneratePermissionsChangeText( const auto prevFlags = prevRights.flags; const auto indefinitely = ChannelData::IsRestrictedForever(newUntil); if (newFlags & Flag::ViewMessages) { - return tr::lng_admin_log_banned( + if (indefinitely) { + return tr::lng_admin_log_banned( + tr::now, + lt_user, + user, + tr::marked); + } + return tr::lng_admin_log_banned_until( tr::now, lt_user, user, + lt_until, + tr::lng_admin_log_restricted_until( + tr::now, + lt_date, + { langDateTime(base::unixtime::parse(newUntil)) }, + tr::marked), tr::marked); } else if (newFlags == 0 && (prevFlags & Flag::ViewMessages)