Support telegram_api::updateDialogFilters.
GitOrigin-RevId: 0a3ada4fa00079a120d358b0abaf413bbb88466d
This commit is contained in:
parent
2bbbfd684d
commit
0e5b939a73
@ -24572,6 +24572,17 @@ void MessagesManager::set_dialog_folder_id(Dialog *d, FolderId folder_id) {
|
||||
on_dialog_updated(d->dialog_id, "set_dialog_folder_id");
|
||||
}
|
||||
|
||||
void MessagesManager::on_update_dialog_filters() {
|
||||
if (td_->auth_manager_->is_bot()) {
|
||||
// just in case
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO logevent
|
||||
|
||||
schedule_dialog_filters_reload(0.0);
|
||||
}
|
||||
|
||||
void MessagesManager::on_create_new_dialog_success(int64 random_id, tl_object_ptr<telegram_api::Updates> &&updates,
|
||||
DialogType expected_type, Promise<Unit> &&promise) {
|
||||
auto sent_messages = UpdatesManager::get_new_messages(updates.get());
|
||||
|
@ -298,6 +298,8 @@ class MessagesManager : public Actor {
|
||||
|
||||
void on_update_dialog_folder_id(DialogId dialog_id, FolderId folder_id);
|
||||
|
||||
void on_update_dialog_filters();
|
||||
|
||||
void on_update_service_notification(tl_object_ptr<telegram_api::updateServiceNotification> &&update,
|
||||
bool skip_new_entities, Promise<Unit> &&promise);
|
||||
|
||||
|
@ -1857,6 +1857,10 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateDialogUnreadMar
|
||||
DialogId(update->peer_), (update->flags_ & telegram_api::updateDialogUnreadMark::UNREAD_MASK) != 0);
|
||||
}
|
||||
|
||||
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateDialogFilters> update, bool /*force_apply*/) {
|
||||
td_->messages_manager_->on_update_dialog_filters();
|
||||
}
|
||||
|
||||
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateDcOptions> update, bool /*force_apply*/) {
|
||||
send_closure(G()->config_manager(), &ConfigManager::on_dc_options_update, DcOptions(update->dc_options_));
|
||||
}
|
||||
@ -2043,7 +2047,4 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateDialogFilter> u
|
||||
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateDialogFilterOrder> update, bool /*force_apply*/) {
|
||||
}
|
||||
|
||||
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateDialogFilters> update, bool /*force_apply*/) {
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
@ -239,6 +239,8 @@ class UpdatesManager : public Actor {
|
||||
void on_update(tl_object_ptr<telegram_api::updatePinnedDialogs> update, bool /*force_apply*/);
|
||||
void on_update(tl_object_ptr<telegram_api::updateDialogUnreadMark> update, bool /*force_apply*/);
|
||||
|
||||
void on_update(tl_object_ptr<telegram_api::updateDialogFilters> update, bool /*force_apply*/);
|
||||
|
||||
void on_update(tl_object_ptr<telegram_api::updateBotInlineQuery> update, bool /*force_apply*/);
|
||||
void on_update(tl_object_ptr<telegram_api::updateBotInlineSend> update, bool /*force_apply*/);
|
||||
|
||||
@ -295,7 +297,6 @@ class UpdatesManager : public Actor {
|
||||
|
||||
void on_update(tl_object_ptr<telegram_api::updateDialogFilter> update, bool /*force_apply*/);
|
||||
void on_update(tl_object_ptr<telegram_api::updateDialogFilterOrder> update, bool /*force_apply*/);
|
||||
void on_update(tl_object_ptr<telegram_api::updateDialogFilters> update, bool /*force_apply*/);
|
||||
};
|
||||
|
||||
} // namespace td
|
||||
|
Loading…
Reference in New Issue
Block a user