From f2d5a2e3bf6099daf2205f1024bd8a84360d1f66 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 30 Jul 2024 13:25:26 +0300 Subject: [PATCH] Ignore updates from business connection. --- td/telegram/MessagesManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 432f101b6..0ebd7220d 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -449,7 +449,11 @@ class UpdateDialogPinnedMessageQuery final : public Td::ResultHandler { auto ptr = result_ptr.move_as_ok(); LOG(INFO) << "Receive result for UpdateDialogPinnedMessageQuery: " << to_string(ptr); - td_->updates_manager_->on_get_updates(std::move(ptr), std::move(promise_)); + if (!business_connection_id_.is_empty()) { + promise_.set_value(Unit()); + } else { + td_->updates_manager_->on_get_updates(std::move(ptr), std::move(promise_)); + } } void on_error(Status status) final {