Allow multiple updateGroupCall updates for just created calls.
This commit is contained in:
parent
18be33a18c
commit
45149bb3cd
@ -58,11 +58,17 @@ class CreateGroupCallQuery : public Td::ResultHandler {
|
||||
LOG(INFO) << "Receive result for CreateGroupCallQuery: " << to_string(ptr);
|
||||
|
||||
auto group_call_ids = td->updates_manager_->get_update_new_group_call_ids(ptr.get());
|
||||
if (group_call_ids.size() != 1) {
|
||||
if (group_call_ids.empty()) {
|
||||
LOG(ERROR) << "Receive wrong CreateGroupCallQuery response " << to_string(ptr);
|
||||
return on_error(id, Status::Error(500, "Receive wrong response"));
|
||||
}
|
||||
auto group_call_id = group_call_ids[0];
|
||||
for (auto other_group_call_id : group_call_ids) {
|
||||
if (group_call_id != other_group_call_id) {
|
||||
LOG(ERROR) << "Receive wrong CreateGroupCallQuery response " << to_string(ptr);
|
||||
return on_error(id, Status::Error(500, "Receive wrong response"));
|
||||
}
|
||||
}
|
||||
|
||||
td->updates_manager_->on_get_updates(
|
||||
std::move(ptr), PromiseCreator::lambda([promise = std::move(promise_), group_call_id](Unit) mutable {
|
||||
|
Loading…
Reference in New Issue
Block a user