Fix GetNotifySettingsExceptionsQuery.

GitOrigin-RevId: b82e7c10304247002bde0ef568c79b38d7e688d6
This commit is contained in:
levlam 2019-02-16 05:52:08 +03:00
parent c8cfee8d7b
commit aae567f0c0
2 changed files with 26 additions and 1 deletions

View File

@ -2877,6 +2877,31 @@ class GetNotifySettingsExceptionsQuery : public Td::ResultHandler {
auto updates_ptr = result_ptr.move_as_ok();
auto dialog_ids = UpdatesManager::get_update_notify_settings_dialog_ids(updates_ptr.get());
vector<tl_object_ptr<telegram_api::User>> users;
vector<tl_object_ptr<telegram_api::Chat>> chats;
switch (updates_ptr->get_id()) {
case telegram_api::updatesCombined::ID: {
auto updates = static_cast<telegram_api::updatesCombined *>(updates_ptr.get());
users = std::move(updates->users_);
chats = std::move(updates->chats_);
reset_to_empty(updates->users_);
reset_to_empty(updates->chats_);
break;
}
case telegram_api::updates::ID: {
auto updates = static_cast<telegram_api::updates *>(updates_ptr.get());
users = std::move(updates->users_);
chats = std::move(updates->chats_);
reset_to_empty(updates->users_);
reset_to_empty(updates->chats_);
break;
}
}
td->contacts_manager_->on_get_users(std::move(users), "GetNotifySettingsExceptionsQuery");
td->contacts_manager_->on_get_chats(std::move(chats), "GetNotifySettingsExceptionsQuery");
for (auto &dialog_id : dialog_ids) {
td->messages_manager_->force_create_dialog(dialog_id, "GetNotifySettingsExceptionsQuery");
}
td->updates_manager_->on_get_updates(std::move(updates_ptr));
promise_.set_value(std::move(dialog_ids));

View File

@ -643,7 +643,7 @@ void UpdatesManager::on_get_updates(tl_object_ptr<telegram_api::Updates> &&updat
return;
}
switch (updates_ptr->get_id()) {
switch (updates_type) {
case telegram_api::updatesTooLong::ID:
get_difference("updatesTooLong");
break;