mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Added date of end of ban from group to admin log.
This commit is contained in:
@@ -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}";
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user