mirror of https://github.com/procxx/kepka.git
Version 1.7.10: Ownership transfer in admin log.
This commit is contained in:
parent
764490b4a9
commit
84aaec30a1
|
@ -1760,6 +1760,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_admin_log_banned" = "banned {user}";
|
"lng_admin_log_banned" = "banned {user}";
|
||||||
"lng_admin_log_restricted" = "changed restrictions for {user} {until}";
|
"lng_admin_log_restricted" = "changed restrictions for {user} {until}";
|
||||||
"lng_admin_log_promoted" = "changed privileges for {user}";
|
"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_default_permissions" = "changed default permissions";
|
||||||
"lng_admin_log_changed_stickers_group" = "{from} changed the group's {sticker_set}";
|
"lng_admin_log_changed_stickers_group" = "{from} changed the group's {sticker_set}";
|
||||||
"lng_admin_log_changed_stickers_set" = "sticker set";
|
"lng_admin_log_changed_stickers_set" = "sticker set";
|
||||||
|
|
|
@ -264,7 +264,7 @@ auto GenerateParticipantChangeTextInner(
|
||||||
const auto oldType = oldParticipant ? oldParticipant->type() : 0;
|
const auto oldType = oldParticipant ? oldParticipant->type() : 0;
|
||||||
return participant.match([&](const MTPDchannelParticipantCreator &data) {
|
return participant.match([&](const MTPDchannelParticipantCreator &data) {
|
||||||
// No valid string here :(
|
// No valid string here :(
|
||||||
return tr::lng_admin_log_invited(
|
return tr::lng_admin_log_transferred(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_user,
|
lt_user,
|
||||||
GenerateUserString(data.vuser_id),
|
GenerateUserString(data.vuser_id),
|
||||||
|
@ -575,6 +575,12 @@ void GenerateItems(
|
||||||
};
|
};
|
||||||
|
|
||||||
auto createParticipantToggleAdmin = [&](const MTPDchannelAdminLogEventActionParticipantToggleAdmin &action) {
|
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 bodyFlags = Flag::f_entities | Flag::f_from_id;
|
||||||
auto bodyReplyTo = 0;
|
auto bodyReplyTo = 0;
|
||||||
auto bodyViaBotId = 0;
|
auto bodyViaBotId = 0;
|
||||||
|
|
Loading…
Reference in New Issue