diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index f3df8793..cd157284 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -11954,7 +11954,7 @@ std::pair> ContactsManager::search_chat_partici DialogParticipant ContactsManager::get_channel_participant(ChannelId channel_id, UserId user_id, int64 &random_id, bool force, Promise &&promise) { - LOG(INFO) << "Trying to get " << user_id << " as member of " << channel_id; + LOG(INFO) << "Trying to get " << user_id << " as member of " << channel_id << " with random_id " << random_id; if (random_id != 0) { // request has already been sent before auto it = received_channel_participant_.find(random_id); @@ -11989,11 +11989,13 @@ DialogParticipant ContactsManager::get_channel_participant(ChannelId channel_id, } while (random_id == 0 || received_channel_participant_.find(random_id) != received_channel_participant_.end()); received_channel_participant_[random_id]; // reserve place for result - LOG(DEBUG) << "Get info about " << user_id << " membership in the " << channel_id; + LOG(DEBUG) << "Get info about " << user_id << " membership in the " << channel_id << " with random_id " << random_id; auto on_result_promise = PromiseCreator::lambda( [this, random_id, promise = std::move(promise)](Result r_dialog_participant) mutable { // ResultHandlers are cleared before managers, so it is safe to capture this + LOG(INFO) << "Receive a member of a channel with random_id " << random_id; + auto it = received_channel_participant_.find(random_id); CHECK(it != received_channel_participant_.end()); diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index b69c12fc..05625af4 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -24833,7 +24833,8 @@ void MessagesManager::set_dialog_participant_status(DialogId dialog_id, UserId u DialogParticipant MessagesManager::get_dialog_participant(DialogId dialog_id, UserId user_id, int64 &random_id, bool force, Promise &&promise) { - LOG(INFO) << "Receive GetChatMember request to get " << user_id << " in " << dialog_id; + LOG(INFO) << "Receive GetChatMember request to get " << user_id << " in " << dialog_id << " with random_id " + << random_id; if (!have_dialog_force(dialog_id)) { promise.set_error(Status::Error(3, "Chat not found")); return DialogParticipant();