Support receiving message TTL setting for all chat types.

This commit is contained in:
levlam 2021-02-09 17:35:48 +03:00
parent 2913b7288b
commit cc50f3b143
8 changed files with 115 additions and 31 deletions

View File

@ -658,11 +658,10 @@ secretChatStateClosed = SecretChatState;
//@user_id Identifier of the chat partner
//@state State of the secret chat
//@is_outbound True, if the chat was created by the current user; otherwise false
//@ttl Current message Time To Live setting (self-destruct timer) for the chat, in seconds
//@key_hash Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9.
//-The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers
//@layer Secret chat layer; determines features supported by the chat partner's application. Video notes are supported if the layer >= 66; nested text entities and underline and strikethrough entities are supported if the layer >= 101
secretChat id:int32 user_id:int32 state:SecretChatState is_outbound:Bool ttl:int32 key_hash:bytes layer:int32 = SecretChat;
secretChat id:int32 user_id:int32 state:SecretChatState is_outbound:Bool key_hash:bytes layer:int32 = SecretChat;
//@class MessageSender @description Contains information about the sender of a message
@ -907,13 +906,14 @@ chatPosition list:ChatList order:int64 is_pinned:Bool source:ChatSource = ChatPo
//@last_read_outbox_message_id Identifier of the last read outgoing message
//@unread_mention_count Number of unread messages with a mention/reply in the chat
//@notification_settings Notification settings for this chat
//@message_ttl_setting Current message Time To Live setting (self-destruct timer) for the chat; 0 if not defined. TTL is counted from the time message or its content is viewed in secret chats and from the send date in other chats
//@action_bar Describes actions which should be possible to do through a chat action bar; may be null
//@voice_chat_group_call_id Group call identifier of an active voice chat; 0 if none or unknown. The voice chat can be received through the method getGroupCall
//@is_voice_chat_empty True, if an active voice chat is empty
//@reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat
//@draft_message A draft of a message in the chat; may be null
//@client_data Contains application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used
chat id:int53 type:ChatType title:string photo:chatPhotoInfo permissions:chatPermissions last_message:message positions:vector<chatPosition> is_marked_as_unread:Bool is_blocked:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 notification_settings:chatNotificationSettings action_bar:ChatActionBar voice_chat_group_call_id:int32 is_voice_chat_empty:Bool reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;
chat id:int53 type:ChatType title:string photo:chatPhotoInfo permissions:chatPermissions last_message:message positions:vector<chatPosition> is_marked_as_unread:Bool is_blocked:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 notification_settings:chatNotificationSettings message_ttl_setting:int32 action_bar:ChatActionBar voice_chat_group_call_id:int32 is_voice_chat_empty:Bool reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;
//@description Represents a list of chats @total_count Approximate total count of chats found @chat_ids List of chat identifiers
chats total_count:int32 chat_ids:vector<int53> = Chats;
@ -3390,6 +3390,9 @@ updateChatNotificationSettings chat_id:int53 notification_settings:chatNotificat
//@description Notification settings for some type of chats were updated @scope Types of chats for which notification settings were updated @notification_settings The new notification settings
updateScopeNotificationSettings scope:NotificationSettingsScope notification_settings:scopeNotificationSettings = Update;
//@description The message Time To Live setting for a chat was changed @chat_id Chat identifier @message_ttl_setting New value of message_ttl_setting
updateChatMessageTtlSetting chat_id:int53 message_ttl_setting:int32 = Update;
//@description The chat action bar was changed @chat_id Chat identifier @action_bar The new value of the action bar; may be null
updateChatActionBar chat_id:int53 action_bar:ChatActionBar = Update;

Binary file not shown.

View File

@ -26,6 +26,7 @@
#include "td/telegram/logevent/LogEvent.h"
#include "td/telegram/logevent/LogEventHelper.h"
#include "td/telegram/MessagesManager.h"
#include "td/telegram/MessageTtlSetting.h"
#include "td/telegram/misc.h"
#include "td/telegram/net/NetQuery.h"
#include "td/telegram/NotificationManager.h"
@ -9599,6 +9600,11 @@ void ContactsManager::update_secret_chat(SecretChat *c, SecretChatId secret_chat
c->state);
c->is_state_changed = false;
}
if (c->is_ttl_changed) {
send_closure_later(G()->messages_manager(), &MessagesManager::on_update_dialog_message_ttl_setting,
DialogId(secret_chat_id), MessageTtlSetting(c->ttl));
c->is_ttl_changed = false;
}
}
if (c->is_changed) {
send_closure(G()->td(), &Td::send_update,
@ -9768,6 +9774,13 @@ void ContactsManager::on_get_user_full(tl_object_ptr<telegram_api::userFull> &&u
}
td_->messages_manager_->on_update_dialog_has_scheduled_server_messages(
DialogId(user_id), (user_full->flags_ & USER_FULL_FLAG_HAS_SCHEDULED_MESSAGES) != 0);
{
MessageTtlSetting message_ttl_setting;
if ((user_full->flags_ & USER_FULL_FLAG_HAS_MESSAGE_TTL) != 0) {
message_ttl_setting = MessageTtlSetting(user_full->ttl_period_);
}
td_->messages_manager_->on_update_dialog_message_ttl_setting(DialogId(user_id), message_ttl_setting);
}
UserFull *user = add_user_full(user_id);
user->expires_at = Time::now() + USER_FULL_EXPIRE_TIME;
@ -10025,6 +10038,13 @@ void ContactsManager::on_get_chat_full(tl_object_ptr<telegram_api::ChatFull> &&c
}
td_->messages_manager_->on_update_dialog_group_call_id(DialogId(chat_id), input_group_call_id);
}
{
MessageTtlSetting message_ttl_setting;
if ((chat_full->flags_ & CHAT_FULL_FLAG_HAS_MESSAGE_TTL) != 0) {
message_ttl_setting = MessageTtlSetting(chat_full->ttl_period_);
}
td_->messages_manager_->on_update_dialog_message_ttl_setting(DialogId(chat_id), message_ttl_setting);
}
ChatFull *chat = add_chat_full(chat_id);
on_update_chat_full_invite_link(chat, std::move(chat_full->exported_invite_));
@ -10080,6 +10100,13 @@ void ContactsManager::on_get_chat_full(tl_object_ptr<telegram_api::ChatFull> &&c
td_->messages_manager_->on_update_dialog_notify_settings(
DialogId(channel_id), std::move(channel_full->notify_settings_), "on_get_channel_full");
{
MessageTtlSetting message_ttl_setting;
if ((channel_full->flags_ & CHANNEL_FULL_FLAG_HAS_MESSAGE_TTL) != 0) {
message_ttl_setting = MessageTtlSetting(channel_full->ttl_period_);
}
td_->messages_manager_->on_update_dialog_message_ttl_setting(DialogId(channel_id), message_ttl_setting);
}
auto c = get_channel(channel_id);
if (c == nullptr) {
@ -13851,7 +13878,8 @@ void ContactsManager::on_update_secret_chat(SecretChatId secret_chat_id, int64 a
if (ttl != -1 && ttl != secret_chat->ttl) {
secret_chat->ttl = ttl;
secret_chat->is_changed = true;
secret_chat->need_save_to_database = true;
secret_chat->is_ttl_changed = true;
}
if (date != 0 && date != secret_chat->date) {
secret_chat->date = date;
@ -15242,7 +15270,7 @@ tl_object_ptr<td_api::SecretChatState> ContactsManager::get_secret_chat_state_ob
td_api::object_ptr<td_api::updateSecretChat> ContactsManager::get_update_unknown_secret_chat_object(
SecretChatId secret_chat_id) {
return td_api::make_object<td_api::updateSecretChat>(td_api::make_object<td_api::secretChat>(
secret_chat_id.get(), 0, get_secret_chat_state_object(SecretChatState::Unknown), false, 0, string(), 0));
secret_chat_id.get(), 0, get_secret_chat_state_object(SecretChatState::Unknown), false, string(), 0));
}
int32 ContactsManager::get_secret_chat_id_object(SecretChatId secret_chat_id, const char *source) const {
@ -15270,10 +15298,10 @@ tl_object_ptr<td_api::secretChat> ContactsManager::get_secret_chat_object(Secret
tl_object_ptr<td_api::secretChat> ContactsManager::get_secret_chat_object_const(SecretChatId secret_chat_id,
const SecretChat *secret_chat) const {
return td_api::make_object<td_api::secretChat>(
secret_chat_id.get(), get_user_id_object(secret_chat->user_id, "secretChat"),
get_secret_chat_state_object(secret_chat->state), secret_chat->is_outbound, secret_chat->ttl,
secret_chat->key_hash, secret_chat->layer);
return td_api::make_object<td_api::secretChat>(secret_chat_id.get(),
get_user_id_object(secret_chat->user_id, "secretChat"),
get_secret_chat_state_object(secret_chat->state),
secret_chat->is_outbound, secret_chat->key_hash, secret_chat->layer);
}
td_api::object_ptr<td_api::botInfo> ContactsManager::get_bot_info_object(UserId user_id) const {

View File

@ -881,6 +881,7 @@ class ContactsManager : public Actor {
bool is_outbound = false;
bool is_ttl_changed = true;
bool is_state_changed = true;
bool is_changed = true; // have new changes that need to be sent to the client and database
bool need_save_to_database = true; // have new changes that need only to be saved to the database
@ -997,6 +998,7 @@ class ContactsManager : public Actor {
static constexpr int32 USER_FULL_FLAG_CAN_PIN_MESSAGE = 1 << 7;
static constexpr int32 USER_FULL_FLAG_HAS_FOLDER_ID = 1 << 11;
static constexpr int32 USER_FULL_FLAG_HAS_SCHEDULED_MESSAGES = 1 << 12;
static constexpr int32 USER_FULL_FLAG_HAS_MESSAGE_TTL = 1 << 14;
static constexpr int32 CHAT_FLAG_USER_IS_CREATOR = 1 << 0;
static constexpr int32 CHAT_FLAG_USER_WAS_KICKED = 1 << 1;
@ -1012,6 +1014,7 @@ class ContactsManager : public Actor {
static constexpr int32 CHAT_FULL_FLAG_HAS_SCHEDULED_MESSAGES = 1 << 8;
static constexpr int32 CHAT_FULL_FLAG_HAS_FOLDER_ID = 1 << 11;
static constexpr int32 CHAT_FULL_FLAG_HAS_ACTIVE_GROUP_CALL = 1 << 12;
static constexpr int32 CHAT_FULL_FLAG_HAS_MESSAGE_TTL = 1 << 14;
static constexpr int32 CHANNEL_FLAG_USER_IS_CREATOR = 1 << 0;
static constexpr int32 CHANNEL_FLAG_USER_HAS_LEFT = 1 << 2;
@ -1060,6 +1063,7 @@ class ContactsManager : public Actor {
static constexpr int32 CHANNEL_FULL_FLAG_HAS_ACTIVE_GROUP_CALL = 1 << 21;
static constexpr int32 CHANNEL_FULL_FLAG_IS_BLOCKED = 1 << 22;
static constexpr int32 CHANNEL_FULL_FLAG_HAS_EXPORTED_INVITE = 1 << 23;
static constexpr int32 CHANNEL_FULL_FLAG_HAS_MESSAGE_TTL = 1 << 24;
static constexpr int32 CHAT_INVITE_FLAG_IS_CHANNEL = 1 << 0;
static constexpr int32 CHAT_INVITE_FLAG_IS_BROADCAST = 1 << 1;

View File

@ -5303,6 +5303,7 @@ void MessagesManager::Dialog::store(StorerT &storer) const {
bool has_distance = distance >= 0;
bool has_last_yet_unsent_message = last_message_id.is_valid() && last_message_id.is_yet_unsent();
bool has_active_group_call_id = active_group_call_id.is_valid();
bool has_message_ttl_setting = !message_ttl_setting.is_empty();
BEGIN_STORE_FLAGS();
STORE_FLAG(has_draft_message);
STORE_FLAG(has_last_database_message);
@ -5362,6 +5363,8 @@ void MessagesManager::Dialog::store(StorerT &storer) const {
STORE_FLAG(is_group_call_empty);
STORE_FLAG(has_active_group_call_id);
STORE_FLAG(can_invite_members);
STORE_FLAG(has_message_ttl_setting);
STORE_FLAG(is_message_ttl_setting_inited);
END_STORE_FLAGS();
}
@ -5449,6 +5452,9 @@ void MessagesManager::Dialog::store(StorerT &storer) const {
if (has_active_group_call_id) {
store(active_group_call_id, storer);
}
if (has_message_ttl_setting) {
store(message_ttl_setting, storer);
}
}
// do not forget to resolve dialog dependencies including dependencies of last_message
@ -5479,6 +5485,7 @@ void MessagesManager::Dialog::parse(ParserT &parser) {
bool has_pending_read_channel_inbox = false;
bool has_distance = false;
bool has_active_group_call_id = false;
bool has_message_ttl_setting = false;
BEGIN_PARSE_FLAGS();
PARSE_FLAG(has_draft_message);
PARSE_FLAG(has_last_database_message);
@ -5538,6 +5545,8 @@ void MessagesManager::Dialog::parse(ParserT &parser) {
PARSE_FLAG(is_group_call_empty);
PARSE_FLAG(has_active_group_call_id);
PARSE_FLAG(can_invite_members);
PARSE_FLAG(has_message_ttl_setting);
PARSE_FLAG(is_message_ttl_setting_inited);
END_PARSE_FLAGS();
} else {
is_folder_id_inited = false;
@ -5557,6 +5566,7 @@ void MessagesManager::Dialog::parse(ParserT &parser) {
has_active_group_call = false;
is_group_call_empty = false;
can_invite_members = false;
is_message_ttl_setting_inited = false;
}
parse(last_new_message_id, parser);
@ -5676,6 +5686,9 @@ void MessagesManager::Dialog::parse(ParserT &parser) {
if (has_active_group_call_id) {
parse(active_group_call_id, parser);
}
if (has_message_ttl_setting) {
parse(message_ttl_setting, parser);
}
}
template <class StorerT>
@ -19768,7 +19781,8 @@ td_api::object_ptr<td_api::chat> MessagesManager::get_chat_object(const Dialog *
can_delete_for_all_users, can_report_dialog(d->dialog_id), d->notification_settings.silent_send_message,
d->server_unread_count + d->local_unread_count, d->last_read_inbox_message_id.get(),
d->last_read_outbox_message_id.get(), d->unread_mention_count,
get_chat_notification_settings_object(&d->notification_settings), get_chat_action_bar_object(d),
get_chat_notification_settings_object(&d->notification_settings),
d->message_ttl_setting.get_message_ttl_setting_object(), get_chat_action_bar_object(d),
active_group_call_id.get(), active_group_call_id.is_valid() ? d->is_group_call_empty : true,
d->reply_markup_message_id.get(), std::move(draft_message), d->client_data);
}
@ -28379,10 +28393,6 @@ void MessagesManager::send_update_chat_action_bar(const Dialog *d) {
}
void MessagesManager::send_update_chat_voice_chat(const Dialog *d) {
if (td_->auth_manager_->is_bot()) {
return;
}
CHECK(d != nullptr);
LOG_CHECK(d->is_update_new_chat_sent) << "Wrong " << d->dialog_id << " in send_update_chat_voice_chat";
on_dialog_updated(d->dialog_id, "send_update_chat_voice_chat");
@ -28392,6 +28402,15 @@ void MessagesManager::send_update_chat_voice_chat(const Dialog *d) {
d->is_group_call_empty));
}
void MessagesManager::send_update_chat_message_ttl_setting(const Dialog *d) {
CHECK(d != nullptr);
LOG_CHECK(d->is_update_new_chat_sent) << "Wrong " << d->dialog_id << " in send_update_chat_message_ttl_setting";
on_dialog_updated(d->dialog_id, "send_update_chat_message_ttl_setting");
send_closure(G()->td(), &Td::send_update,
td_api::make_object<td_api::updateChatMessageTtlSetting>(
d->dialog_id.get(), d->message_ttl_setting.get_message_ttl_setting_object()));
}
void MessagesManager::send_update_chat_has_scheduled_messages(Dialog *d, bool from_deletion) {
if (td_->auth_manager_->is_bot()) {
return;
@ -29540,10 +29559,6 @@ void MessagesManager::do_set_dialog_folder_id(Dialog *d, FolderId folder_id) {
void MessagesManager::on_update_dialog_group_call(DialogId dialog_id, bool has_active_group_call,
bool is_group_call_empty, const char *source) {
if (td_->auth_manager_->is_bot()) {
return;
}
LOG(INFO) << "Update voice chat in " << dialog_id << " with has_active_voice_chat = " << has_active_group_call
<< " and is_voice_chat_empty = " << is_group_call_empty << " from " << source;
@ -29582,10 +29597,6 @@ void MessagesManager::on_update_dialog_group_call(DialogId dialog_id, bool has_a
}
void MessagesManager::on_update_dialog_group_call_id(DialogId dialog_id, InputGroupCallId input_group_call_id) {
if (td_->auth_manager_->is_bot()) {
return;
}
auto d = get_dialog_force(dialog_id);
if (d == nullptr) {
// nothing to do
@ -29607,6 +29618,24 @@ void MessagesManager::on_update_dialog_group_call_id(DialogId dialog_id, InputGr
}
}
void MessagesManager::on_update_dialog_message_ttl_setting(DialogId dialog_id, MessageTtlSetting message_ttl_setting) {
auto d = get_dialog_force(dialog_id);
if (d == nullptr) {
// nothing to do
return;
}
if (d->message_ttl_setting != message_ttl_setting) {
d->message_ttl_setting = message_ttl_setting;
d->is_message_ttl_setting_inited = true;
send_update_chat_message_ttl_setting(d);
}
if (!d->is_message_ttl_setting_inited) {
d->is_message_ttl_setting_inited = true;
on_dialog_updated(dialog_id, "on_update_dialog_message_ttl_setting");
}
}
void MessagesManager::on_update_dialog_filters() {
if (td_->auth_manager_->is_bot()) {
// just in case
@ -33568,6 +33597,9 @@ MessagesManager::Dialog *MessagesManager::add_new_dialog(unique_ptr<Dialog> &&d,
do_set_dialog_folder_id(
d.get(), td_->contacts_manager_->get_secret_chat_initial_folder_id(dialog_id.get_secret_chat_id()));
}
d->message_ttl_setting =
MessageTtlSetting(td_->contacts_manager_->get_secret_chat_ttl(dialog_id.get_secret_chat_id()));
d->is_message_ttl_setting_inited = true;
break;
case DialogType::None:
@ -33671,6 +33703,10 @@ void MessagesManager::fix_new_dialog(Dialog *d, unique_ptr<Message> &&last_datab
// asynchronously get dialog folder id from the server
get_dialog_info_full(dialog_id, Auto());
}
if (!d->is_message_ttl_setting_inited && !td_->auth_manager_->is_bot() && order != DEFAULT_ORDER) {
// asynchronously get dialog message ttl setting from the server
get_dialog_info_full(dialog_id, Auto());
}
if (!d->know_action_bar && !td_->auth_manager_->is_bot() && dialog_type != DialogType::SecretChat &&
dialog_id != get_my_dialog_id() && have_input_peer(dialog_id, AccessRights::Read)) {
// asynchronously get action bar from the server

View File

@ -32,6 +32,7 @@
#include "td/telegram/MessageReplyInfo.h"
#include "td/telegram/MessagesDb.h"
#include "td/telegram/MessageSearchFilter.h"
#include "td/telegram/MessageTtlSetting.h"
#include "td/telegram/net/NetQuery.h"
#include "td/telegram/Notification.h"
#include "td/telegram/NotificationGroupId.h"
@ -288,6 +289,8 @@ class MessagesManager : public Actor {
void on_update_dialog_group_call_id(DialogId dialog_id, InputGroupCallId input_group_call_id);
void on_update_dialog_message_ttl_setting(DialogId dialog_id, MessageTtlSetting message_ttl_setting);
void on_update_dialog_filters();
void on_update_service_notification(tl_object_ptr<telegram_api::updateServiceNotification> &&update,
@ -1070,9 +1073,9 @@ class MessagesManager : public Actor {
string send_error_message;
double try_resend_at = 0;
int32 ttl_period = 0;
int32 ttl = 0;
double ttl_expires_at = 0;
int32 ttl_period = 0; // counted from message send date
int32 ttl = 0; // counted from message content view date
double ttl_expires_at = 0; // only for ttl
int64 media_album_id = 0;
@ -1145,6 +1148,7 @@ class MessagesManager : public Actor {
MessageId last_pinned_message_id;
MessageId reply_markup_message_id;
DialogNotificationSettings notification_settings;
MessageTtlSetting message_ttl_setting;
unique_ptr<DraftMessage> draft_message;
LogEventIdWithGeneration save_draft_message_log_event_id;
LogEventIdWithGeneration save_notification_settings_log_event_id;
@ -1226,6 +1230,7 @@ class MessagesManager : public Actor {
bool had_last_yet_unsent_message = false; // whether the dialog was stored to database without last message
bool has_active_group_call = false;
bool is_group_call_empty = false;
bool is_message_ttl_setting_inited = false;
bool increment_view_counter = false;
@ -2216,6 +2221,8 @@ class MessagesManager : public Actor {
void send_update_chat_voice_chat(const Dialog *d);
void send_update_chat_message_ttl_setting(const Dialog *d);
void send_update_chat_has_scheduled_messages(Dialog *d, bool from_deletion);
void send_update_user_chat_action(DialogId dialog_id, MessageId top_thread_message_id, UserId user_id,

View File

@ -28,6 +28,7 @@
#include "td/telegram/Location.h"
#include "td/telegram/MessageId.h"
#include "td/telegram/MessagesManager.h"
#include "td/telegram/MessageTtlSetting.h"
#include "td/telegram/net/DcOptions.h"
#include "td/telegram/net/NetQuery.h"
#include "td/telegram/NotificationManager.h"
@ -2297,6 +2298,15 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updatePeerSettings> u
promise.set_value(Unit());
}
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updatePeerHistoryTTL> update, Promise<Unit> &&promise) {
MessageTtlSetting message_ttl_setting;
if ((update->flags_ & telegram_api::updatePeerHistoryTTL::TTL_PERIOD_MASK) != 0) {
message_ttl_setting = MessageTtlSetting(update->ttl_period_);
}
td_->messages_manager_->on_update_dialog_message_ttl_setting(DialogId(update->peer_), message_ttl_setting);
promise.set_value(Unit());
}
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updatePeerLocated> update, Promise<Unit> &&promise) {
td_->contacts_manager_->on_update_peer_located(std::move(update->peers_), true);
promise.set_value(Unit());
@ -2858,8 +2868,4 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateTheme> update,
promise.set_value(Unit());
}
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updatePeerHistoryTTL> update, Promise<Unit> &&promise) {
promise.set_value(Unit());
}
} // namespace td

View File

@ -337,6 +337,8 @@ class UpdatesManager : public Actor {
void on_update(tl_object_ptr<telegram_api::updateReadHistoryOutbox> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateNotifySettings> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updatePeerSettings> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updatePeerHistoryTTL> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updatePeerLocated> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateWebPage> update, Promise<Unit> &&promise);
@ -459,8 +461,6 @@ class UpdatesManager : public Actor {
void on_update(tl_object_ptr<telegram_api::updateChatParticipant> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateTheme> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updatePeerHistoryTTL> update, Promise<Unit> &&promise);
};
} // namespace td