Update API scheme on layer 150: AntiSpam admin log.
This commit is contained in:
parent
b81868eeba
commit
a8c230aba3
|
@ -3138,6 +3138,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_admin_log_disallowed_unmute_self_channel" = "{from} started muting new live stream members";
|
"lng_admin_log_disallowed_unmute_self_channel" = "{from} started muting new live stream members";
|
||||||
"lng_admin_log_participant_volume" = "{from} changed voice chat volume for {user} to {percent}";
|
"lng_admin_log_participant_volume" = "{from} changed voice chat volume for {user} to {percent}";
|
||||||
"lng_admin_log_participant_volume_channel" = "{from} changed live stream volume for {user} to {percent}";
|
"lng_admin_log_participant_volume_channel" = "{from} changed live stream volume for {user} to {percent}";
|
||||||
|
"lng_admin_log_antispam_enabled" = "{from} enabled aggressive anti-spam";
|
||||||
|
"lng_admin_log_antispam_disabled" = "{from} disabled aggressive anti-spam";
|
||||||
"lng_admin_log_user_with_username" = "{name} ({mention})";
|
"lng_admin_log_user_with_username" = "{name} ({mention})";
|
||||||
"lng_admin_log_messages_ttl_set" = "{from} enabled messages auto-delete after {duration}";
|
"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_changed" = "{from} changed messages auto-delete period from {previous} to {duration}";
|
||||||
|
|
|
@ -967,6 +967,7 @@ channelAdminLogEventActionCreateTopic#58707d28 topic:ForumTopic = ChannelAdminLo
|
||||||
channelAdminLogEventActionEditTopic#f06fe208 prev_topic:ForumTopic new_topic:ForumTopic = ChannelAdminLogEventAction;
|
channelAdminLogEventActionEditTopic#f06fe208 prev_topic:ForumTopic new_topic:ForumTopic = ChannelAdminLogEventAction;
|
||||||
channelAdminLogEventActionDeleteTopic#ae168909 topic:ForumTopic = ChannelAdminLogEventAction;
|
channelAdminLogEventActionDeleteTopic#ae168909 topic:ForumTopic = ChannelAdminLogEventAction;
|
||||||
channelAdminLogEventActionPinTopic#5d8d353b flags:# prev_topic:flags.0?ForumTopic new_topic:flags.1?ForumTopic = ChannelAdminLogEventAction;
|
channelAdminLogEventActionPinTopic#5d8d353b flags:# prev_topic:flags.0?ForumTopic new_topic:flags.1?ForumTopic = ChannelAdminLogEventAction;
|
||||||
|
channelAdminLogEventActionToggleAntiSpam#64f36dfc new_value:Bool = ChannelAdminLogEventAction;
|
||||||
|
|
||||||
channelAdminLogEvent#1fad68cd id:long date:int user_id:long action:ChannelAdminLogEventAction = ChannelAdminLogEvent;
|
channelAdminLogEvent#1fad68cd id:long date:int user_id:long action:ChannelAdminLogEventAction = ChannelAdminLogEvent;
|
||||||
|
|
||||||
|
|
|
@ -741,6 +741,7 @@ void GenerateItems(
|
||||||
using LogEditTopic = MTPDchannelAdminLogEventActionEditTopic;
|
using LogEditTopic = MTPDchannelAdminLogEventActionEditTopic;
|
||||||
using LogDeleteTopic = MTPDchannelAdminLogEventActionDeleteTopic;
|
using LogDeleteTopic = MTPDchannelAdminLogEventActionDeleteTopic;
|
||||||
using LogPinTopic = MTPDchannelAdminLogEventActionPinTopic;
|
using LogPinTopic = MTPDchannelAdminLogEventActionPinTopic;
|
||||||
|
using LogToggleAntiSpam = MTPDchannelAdminLogEventActionToggleAntiSpam;
|
||||||
|
|
||||||
const auto session = &history->session();
|
const auto session = &history->session();
|
||||||
const auto id = event.vid().v;
|
const auto id = event.vid().v;
|
||||||
|
@ -1750,6 +1751,18 @@ void GenerateItems(
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const auto createToggleAntiSpam = [&](const LogToggleAntiSpam &data) {
|
||||||
|
const auto enabled = (data.vnew_value().type() == mtpc_boolTrue);
|
||||||
|
const auto text = (enabled
|
||||||
|
? tr::lng_admin_log_antispam_enabled
|
||||||
|
: tr::lng_admin_log_antispam_disabled)(
|
||||||
|
tr::now,
|
||||||
|
lt_from,
|
||||||
|
fromLinkText,
|
||||||
|
Ui::Text::WithEntities);
|
||||||
|
addSimpleServiceMessage(text);
|
||||||
|
};
|
||||||
|
|
||||||
action.match(
|
action.match(
|
||||||
createChangeTitle,
|
createChangeTitle,
|
||||||
createChangeAbout,
|
createChangeAbout,
|
||||||
|
@ -1792,7 +1805,8 @@ void GenerateItems(
|
||||||
createCreateTopic,
|
createCreateTopic,
|
||||||
createEditTopic,
|
createEditTopic,
|
||||||
createDeleteTopic,
|
createDeleteTopic,
|
||||||
createPinTopic);
|
createPinTopic,
|
||||||
|
createToggleAntiSpam);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace AdminLog
|
} // namespace AdminLog
|
||||||
|
|
Loading…
Reference in New Issue