Don't call getDifference explicitly after failed requests.

This commit is contained in:
levlam 2023-03-09 16:41:31 +03:00
parent ee3df1d03c
commit f100399c8e
2 changed files with 0 additions and 12 deletions

View File

@ -134,7 +134,6 @@ class GetContactsQuery final : public Td::ResultHandler {
void on_error(Status status) final { void on_error(Status status) final {
td_->contacts_manager_->on_get_contacts_failed(std::move(status)); td_->contacts_manager_->on_get_contacts_failed(std::move(status));
td_->updates_manager_->get_difference("GetContactsQuery");
} }
}; };
@ -2714,7 +2713,6 @@ class DeleteChatUserQuery final : public Td::ResultHandler {
void on_error(Status status) final { void on_error(Status status) final {
promise_.set_error(std::move(status)); promise_.set_error(std::move(status));
td_->updates_manager_->get_difference("DeleteChatUserQuery");
} }
}; };
@ -2748,7 +2746,6 @@ class JoinChannelQuery final : public Td::ResultHandler {
void on_error(Status status) final { void on_error(Status status) final {
td_->contacts_manager_->on_get_channel_error(channel_id_, status, "JoinChannelQuery"); td_->contacts_manager_->on_get_channel_error(channel_id_, status, "JoinChannelQuery");
promise_.set_error(std::move(status)); promise_.set_error(std::move(status));
td_->updates_manager_->get_difference("JoinChannelQuery");
} }
}; };
@ -2926,7 +2923,6 @@ class LeaveChannelQuery final : public Td::ResultHandler {
void on_error(Status status) final { void on_error(Status status) final {
td_->contacts_manager_->on_get_channel_error(channel_id_, status, "LeaveChannelQuery"); td_->contacts_manager_->on_get_channel_error(channel_id_, status, "LeaveChannelQuery");
promise_.set_error(std::move(status)); promise_.set_error(std::move(status));
td_->updates_manager_->get_difference("LeaveChannelQuery");
} }
}; };
@ -3008,7 +3004,6 @@ class EditChannelCreatorQuery final : public Td::ResultHandler {
} }
td_->contacts_manager_->on_get_channel_error(channel_id_, status, "EditChannelCreatorQuery"); td_->contacts_manager_->on_get_channel_error(channel_id_, status, "EditChannelCreatorQuery");
promise_.set_error(std::move(status)); promise_.set_error(std::move(status));
td_->updates_manager_->get_difference("EditChannelCreatorQuery");
} }
}; };
@ -3036,7 +3031,6 @@ class MigrateChatQuery final : public Td::ResultHandler {
void on_error(Status status) final { void on_error(Status status) final {
promise_.set_error(std::move(status)); promise_.set_error(std::move(status));
td_->updates_manager_->get_difference("MigrateChatQuery");
} }
}; };

View File

@ -1333,7 +1333,6 @@ class EditDialogPhotoQuery final : public Td::ResultHandler {
} else { } else {
td_->messages_manager_->on_get_dialog_error(dialog_id_, status, "EditDialogPhotoQuery"); td_->messages_manager_->on_get_dialog_error(dialog_id_, status, "EditDialogPhotoQuery");
} }
td_->updates_manager_->get_difference("EditDialogPhotoQuery");
promise_.set_error(std::move(status)); promise_.set_error(std::move(status));
} }
}; };
@ -1380,8 +1379,6 @@ class EditDialogTitleQuery final : public Td::ResultHandler {
} }
void on_error(Status status) final { void on_error(Status status) final {
td_->updates_manager_->get_difference("EditDialogTitleQuery");
if (status.message() == "CHAT_NOT_MODIFIED") { if (status.message() == "CHAT_NOT_MODIFIED") {
if (!td_->auth_manager_->is_bot()) { if (!td_->auth_manager_->is_bot()) {
promise_.set_value(Unit()); promise_.set_value(Unit());
@ -33879,9 +33876,6 @@ void MessagesManager::on_create_new_dialog_fail(int64 random_id, Status error, P
CHECK(error.is_error()); CHECK(error.is_error());
promise.set_error(std::move(error)); promise.set_error(std::move(error));
// repairing state by running get difference
td_->updates_manager_->get_difference("on_create_new_dialog_fail");
} }
void MessagesManager::on_dialog_bots_updated(DialogId dialog_id, vector<UserId> bot_user_ids, bool from_database) { void MessagesManager::on_dialog_bots_updated(DialogId dialog_id, vector<UserId> bot_user_ids, bool from_database) {