diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 6e0703a80..0c4d634e3 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -13809,7 +13809,8 @@ void ContactsManager::on_chat_update(telegram_api::chat &chat, const char *sourc bool has_active_group_call = (chat.flags_ & CHAT_FLAG_HAS_ACTIVE_GROUP_CALL) != 0; bool is_group_call_empty = (chat.flags_ & CHAT_FLAG_IS_GROUP_CALL_NON_EMPTY) == 0; - td_->messages_manager_->on_update_dialog_group_call(DialogId(chat_id), has_active_group_call, is_group_call_empty); + td_->messages_manager_->on_update_dialog_group_call(DialogId(chat_id), has_active_group_call, is_group_call_empty, + "receive chat"); } void ContactsManager::on_chat_update(telegram_api::chatForbidden &chat, const char *source) { @@ -14002,7 +14003,8 @@ void ContactsManager::on_chat_update(telegram_api::channel &channel, const char bool has_active_group_call = (channel.flags_ & CHANNEL_FLAG_HAS_ACTIVE_GROUP_CALL) != 0; bool is_group_call_empty = (channel.flags_ & CHANNEL_FLAG_IS_GROUP_CALL_NON_EMPTY) == 0; - td_->messages_manager_->on_update_dialog_group_call(DialogId(channel_id), has_active_group_call, is_group_call_empty); + td_->messages_manager_->on_update_dialog_group_call(DialogId(channel_id), has_active_group_call, is_group_call_empty, + "receive channel"); } void ContactsManager::on_chat_update(telegram_api::channelForbidden &channel, const char *source) { @@ -14041,7 +14043,7 @@ void ContactsManager::on_chat_update(telegram_api::channelForbidden &channel, co // on_update_channel_username(c, channel_id, ""); // don't know if channel username is empty, so don't update it tl_object_ptr banned_rights; // == nullptr on_update_channel_default_permissions(c, channel_id, get_restricted_rights(banned_rights)); - td_->messages_manager_->on_update_dialog_group_call(DialogId(channel_id), false, false); + td_->messages_manager_->on_update_dialog_group_call(DialogId(channel_id), false, false, "receive channelForbidden"); bool sign_messages = false; bool is_slow_mode_enabled = false; diff --git a/td/telegram/GroupCallManager.cpp b/td/telegram/GroupCallManager.cpp index da9210ba3..7c9573b33 100644 --- a/td/telegram/GroupCallManager.cpp +++ b/td/telegram/GroupCallManager.cpp @@ -665,7 +665,7 @@ void GroupCallManager::on_voice_chat_created(DialogId dialog_id, InputGroupCallI return promise.set_error(Status::Error(500, "Receive invalid group call identifier")); } - td_->messages_manager_->on_update_dialog_group_call(dialog_id, true, true); + td_->messages_manager_->on_update_dialog_group_call(dialog_id, true, true, "on_voice_chat_created"); td_->messages_manager_->on_update_dialog_group_call_id(dialog_id, input_group_call_id); promise.set_value(get_group_call_id(input_group_call_id, dialog_id)); @@ -1952,7 +1952,7 @@ void GroupCallManager::update_group_call_dialog(const GroupCall *group_call, con } td_->messages_manager_->on_update_dialog_group_call(group_call->dialog_id, group_call->is_active, - group_call->participant_count == 0); + group_call->participant_count == 0, source); } vector GroupCallManager::get_recent_speaker_user_ids(const GroupCall *group_call, bool for_update) { diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index ba6389885..a3e06192c 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -28973,13 +28973,13 @@ void MessagesManager::do_set_dialog_folder_id(Dialog *d, FolderId folder_id) { } void MessagesManager::on_update_dialog_group_call(DialogId dialog_id, bool has_active_group_call, - bool is_group_call_empty) { + bool is_group_call_empty, const char *source) { if (td_->auth_manager_->is_bot()) { return; } LOG(INFO) << "Update voice chat in " << dialog_id << " with has_active_voice_chat = " << has_active_group_call - << " and is_voice_chat_empty = " << is_group_call_empty; + << " and is_voice_chat_empty = " << is_group_call_empty << " from " << source; CHECK(dialog_id.is_valid()); Dialog *d = get_dialog(dialog_id); // must not create the Dialog, because is called from on_get_chat diff --git a/td/telegram/MessagesManager.h b/td/telegram/MessagesManager.h index e6bf71d34..3f88e1977 100644 --- a/td/telegram/MessagesManager.h +++ b/td/telegram/MessagesManager.h @@ -333,7 +333,8 @@ class MessagesManager : public Actor { void on_update_dialog_folder_id(DialogId dialog_id, FolderId folder_id); - void on_update_dialog_group_call(DialogId dialog_id, bool has_active_group_call, bool is_group_call_empty); + void on_update_dialog_group_call(DialogId dialog_id, bool has_active_group_call, bool is_group_call_empty, + const char *source); void on_update_dialog_group_call_id(DialogId dialog_id, InputGroupCallId input_group_call_id);