Remove expected error logging.

GitOrigin-RevId: 8f2df5d7cfe0594e8648ccfa56ef0cee06178292
This commit is contained in:
levlam 2020-08-19 13:04:22 +03:00
parent afc1d789de
commit 732902a00f

View File

@ -3169,9 +3169,13 @@ class DeleteMessagesQuery : public Td::ResultHandler {
}
void on_error(uint64 id, Status status) override {
if (!G()->is_expected_error(status) &&
(dialog_id_.get_type() == DialogType::User || status.message() != "MESSAGE_DELETE_FORBIDDEN")) {
LOG(ERROR) << "Receive error for delete messages: " << status;
if (!G()->is_expected_error(status)) {
// MESSAGE_DELETE_FORBIDDEN can be returned in group chats when administrator rights was removed
// MESSAGE_DELETE_FORBIDDEN can be returned in private chats for bots when revoke time limit exceeded
if (status.message() != "MESSAGE_DELETE_FORBIDDEN" ||
(dialog_id_.get_type() == DialogType::User && !td->auth_manager_->is_bot())) {
LOG(ERROR) << "Receive error for delete messages: " << status;
}
}
promise_.set_error(std::move(status));
}