Add chatEventMessageTtlSettingChanged.

This commit is contained in:
levlam 2021-02-09 18:10:20 +03:00
parent 4423ccbde2
commit 5ac0a9bd8a
3 changed files with 10 additions and 2 deletions

View File

@ -2418,6 +2418,9 @@ chatEventLinkedChatChanged old_linked_chat_id:int53 new_linked_chat_id:int53 = C
//@description The slow_mode_delay setting of a supergroup was changed @old_slow_mode_delay Previous value of slow_mode_delay @new_slow_mode_delay New value of slow_mode_delay
chatEventSlowModeDelayChanged old_slow_mode_delay:int32 new_slow_mode_delay:int32 = ChatEventAction;
//@description The message TTL setting was changed @old_message_ttl_setting Previous value of message_ttl_setting @new_message_ttl_setting New value of message_ttl_setting
chatEventMessageTtlSettingChanged old_message_ttl_setting:int32 new_message_ttl_setting:int32 = ChatEventAction;
//@description The sign_messages setting of a channel was toggled @sign_messages New value of sign_messages
chatEventSignMessagesToggled sign_messages:Bool = ChatEventAction;

Binary file not shown.

View File

@ -31335,8 +31335,13 @@ tl_object_ptr<td_api::ChatEventAction> MessagesManager::get_chat_event_action_ob
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionToggleGroupCallSetting>(action_ptr);
return make_tl_object<td_api::chatEventVoiceChatMuteNewParticipantsToggled>(action->join_muted_);
}
case telegram_api::channelAdminLogEventActionChangeHistoryTTL::ID:
return nullptr;
case telegram_api::channelAdminLogEventActionChangeHistoryTTL::ID: {
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionChangeHistoryTTL>(action_ptr);
auto old_value = MessageTtlSetting(clamp(action->prev_value_, 0, 86400 * 366));
auto new_value = MessageTtlSetting(clamp(action->new_value_, 0, 86400 * 366));
return make_tl_object<td_api::chatEventMessageTtlSettingChanged>(old_value.get_message_ttl_setting_object(),
new_value.get_message_ttl_setting_object());
}
default:
UNREACHABLE();
return nullptr;