Add separate GroupCallManager::on_update_group_call_rights method.
This commit is contained in:
parent
7a6c393b7b
commit
2a50685321
@ -698,9 +698,8 @@ void GroupCallManager::get_group_call(GroupCallId group_call_id,
|
|||||||
reload_group_call(input_group_call_id, std::move(promise));
|
reload_group_call(input_group_call_id, std::move(promise));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupCallManager::reload_group_call(InputGroupCallId input_group_call_id,
|
void GroupCallManager::on_update_group_call_rights(InputGroupCallId input_group_call_id) {
|
||||||
Promise<td_api::object_ptr<td_api::groupCall>> &&promise) {
|
if (need_group_call_participants(input_group_call_id)) {
|
||||||
if (!promise && need_group_call_participants(input_group_call_id)) {
|
|
||||||
auto group_call = get_group_call(input_group_call_id);
|
auto group_call = get_group_call(input_group_call_id);
|
||||||
CHECK(group_call != nullptr && group_call->is_inited);
|
CHECK(group_call != nullptr && group_call->is_inited);
|
||||||
try_load_group_call_administrators(input_group_call_id, group_call->dialog_id);
|
try_load_group_call_administrators(input_group_call_id, group_call->dialog_id);
|
||||||
@ -713,6 +712,11 @@ void GroupCallManager::reload_group_call(InputGroupCallId input_group_call_id,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reload_group_call(input_group_call_id, Auto());
|
||||||
|
}
|
||||||
|
|
||||||
|
void GroupCallManager::reload_group_call(InputGroupCallId input_group_call_id,
|
||||||
|
Promise<td_api::object_ptr<td_api::groupCall>> &&promise) {
|
||||||
auto &queries = load_group_call_queries_[input_group_call_id];
|
auto &queries = load_group_call_queries_[input_group_call_id];
|
||||||
queries.push_back(std::move(promise));
|
queries.push_back(std::move(promise));
|
||||||
if (queries.size() == 1) {
|
if (queries.size() == 1) {
|
||||||
|
@ -41,6 +41,8 @@ class GroupCallManager : public Actor {
|
|||||||
|
|
||||||
void get_group_call(GroupCallId group_call_id, Promise<td_api::object_ptr<td_api::groupCall>> &&promise);
|
void get_group_call(GroupCallId group_call_id, Promise<td_api::object_ptr<td_api::groupCall>> &&promise);
|
||||||
|
|
||||||
|
void on_update_group_call_rights(InputGroupCallId input_group_call_id);
|
||||||
|
|
||||||
void reload_group_call(InputGroupCallId input_group_call_id,
|
void reload_group_call(InputGroupCallId input_group_call_id,
|
||||||
Promise<td_api::object_ptr<td_api::groupCall>> &&promise);
|
Promise<td_api::object_ptr<td_api::groupCall>> &&promise);
|
||||||
|
|
||||||
|
@ -10663,7 +10663,7 @@ void MessagesManager::reload_dialog_group_call(DialogId dialog_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (d->active_group_call_id.is_valid()) {
|
if (d->active_group_call_id.is_valid()) {
|
||||||
td_->group_call_manager_->reload_group_call(d->active_group_call_id, Auto());
|
td_->group_call_manager_->on_update_group_call_rights(d->active_group_call_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user