Warn only about failed deletions of accessible messages.

main
levlam 10 months ago
parent 0503778a2d
commit 2629d50826

@ -5687,7 +5687,8 @@ class Client::TdOnDeleteFailedToSendMessageCallback final : public TdQueryCallba
void on_result(object_ptr<td_api::Object> result) final { void on_result(object_ptr<td_api::Object> result) final {
if (result->get_id() == td_api::error::ID) { if (result->get_id() == td_api::error::ID) {
auto error = move_object_as<td_api::error>(result); auto error = move_object_as<td_api::error>(result);
if (error->code_ != 401 && !client_->need_close_ && !client_->closing_ && !client_->logging_out_) { if (error->code_ != 401 && !client_->need_close_ && !client_->closing_ && !client_->logging_out_ &&
client_->have_message_access(chat_id_)) {
LOG(ERROR) << "Can't delete failed to send message " << message_id_ << " because of " LOG(ERROR) << "Can't delete failed to send message " << message_id_ << " because of "
<< td::oneline(to_string(error)) << " in " << client_->get_chat_description(chat_id_) << td::oneline(to_string(error)) << " in " << client_->get_chat_description(chat_id_)
<< ". Old chat description: " << old_chat_description_; << ". Old chat description: " << old_chat_description_;

Loading…
Cancel
Save