Version 1.7.10: Ownership transfer in admin log.

This commit is contained in:
John Preston 2019-06-24 15:08:19 +02:00
parent 764490b4a9
commit 84aaec30a1
2 changed files with 8 additions and 1 deletions

View File

@ -1760,6 +1760,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_admin_log_banned" = "banned {user}";
"lng_admin_log_restricted" = "changed restrictions for {user} {until}";
"lng_admin_log_promoted" = "changed privileges for {user}";
"lng_admin_log_transferred" = "transferred ownership to {user}";
"lng_admin_log_changed_default_permissions" = "changed default permissions";
"lng_admin_log_changed_stickers_group" = "{from} changed the group's {sticker_set}";
"lng_admin_log_changed_stickers_set" = "sticker set";

View File

@ -264,7 +264,7 @@ auto GenerateParticipantChangeTextInner(
const auto oldType = oldParticipant ? oldParticipant->type() : 0;
return participant.match([&](const MTPDchannelParticipantCreator &data) {
// No valid string here :(
return tr::lng_admin_log_invited(
return tr::lng_admin_log_transferred(
tr::now,
lt_user,
GenerateUserString(data.vuser_id),
@ -575,6 +575,12 @@ void GenerateItems(
};
auto createParticipantToggleAdmin = [&](const MTPDchannelAdminLogEventActionParticipantToggleAdmin &action) {
if (action.vnew_participant.type() == mtpc_channelParticipantAdmin
&& action.vprev_participant.type() == mtpc_channelParticipantCreator) {
// In case of ownership transfer we show that message in
// the "User > Creator" part and skip the "Creator > Admin" part.
return;
}
auto bodyFlags = Flag::f_entities | Flag::f_from_id;
auto bodyReplyTo = 0;
auto bodyViaBotId = 0;