From 81dc2e242b6c3ea358dba6b5a750727c378dc098 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 6 Aug 2024 16:00:36 +0300 Subject: [PATCH] Call on_get_channel_error in UpdatePersonalChannelQuery. --- td/telegram/UserManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/td/telegram/UserManager.cpp b/td/telegram/UserManager.cpp index 1f60ae4d1..786139d8d 100644 --- a/td/telegram/UserManager.cpp +++ b/td/telegram/UserManager.cpp @@ -1078,12 +1078,14 @@ class UpdateBirthdayQuery final : public Td::ResultHandler { class UpdatePersonalChannelQuery final : public Td::ResultHandler { Promise promise_; + ChannelId channel_id_; public: explicit UpdatePersonalChannelQuery(Promise &&promise) : promise_(std::move(promise)) { } void send(ChannelId channel_id) { + channel_id_ = channel_id; telegram_api::object_ptr input_channel; if (channel_id == ChannelId()) { input_channel = telegram_api::make_object(); @@ -1110,6 +1112,9 @@ class UpdatePersonalChannelQuery final : public Td::ResultHandler { } void on_error(Status status) final { + if (channel_id_.is_valid()) { + td_->chat_manager_->on_get_channel_error(channel_id_, status, "UpdatePersonalChannelQuery"); + } promise_.set_error(std::move(status)); } };