Ignore CHANNEL_PRIVATE errors for GetChannelDifferenceQuery after restart.

This commit is contained in:
levlam 2021-11-08 17:24:27 +03:00
parent b0eca77c9a
commit 9f5a1567f0
2 changed files with 3 additions and 2 deletions

View File

@ -11841,7 +11841,8 @@ bool ContactsManager::on_get_channel_error(ChannelId channel_id, const Status &s
auto c = get_channel(channel_id); auto c = get_channel(channel_id);
if (c == nullptr) { if (c == nullptr) {
if (td_->auth_manager_->is_bot() && source == "GetChannelsQuery") { if (source == "GetChannelDifferenceQuery" || (td_->auth_manager_->is_bot() && source == "GetChannelsQuery")) {
// get channel difference after restart
// get channel from server by its identifier // get channel from server by its identifier
return true; return true;
} }

View File

@ -4681,7 +4681,7 @@ class GetChannelDifferenceQuery final : public Td::ResultHandler {
void on_error(Status status) final { void on_error(Status status) final {
if (!td_->messages_manager_->on_get_dialog_error(dialog_id_, status, "GetChannelDifferenceQuery")) { if (!td_->messages_manager_->on_get_dialog_error(dialog_id_, status, "GetChannelDifferenceQuery")) {
LOG(ERROR) << "Receive updates.getChannelDifference error for " << dialog_id_ << " with pts " << pts_ LOG(ERROR) << "Receive error for GetChannelDifferenceQuery for " << dialog_id_ << " with pts " << pts_
<< " and limit " << limit_ << ": " << status; << " and limit " << limit_ << ": " << status;
} }
td_->messages_manager_->on_get_channel_difference(dialog_id_, pts_, limit_, nullptr); td_->messages_manager_->on_get_channel_difference(dialog_id_, pts_, limit_, nullptr);