Process group call participants returned in getGroupCall.
This commit is contained in:
parent
4a0c42729b
commit
8c3120b5cc
|
@ -606,6 +606,16 @@ void GroupCallManager::finish_get_group_call(InputGroupCallId input_group_call_i
|
||||||
if (update_group_call(result.ok()->call_, ChannelId()) != input_group_call_id) {
|
if (update_group_call(result.ok()->call_, ChannelId()) != input_group_call_id) {
|
||||||
LOG(ERROR) << "Expected " << input_group_call_id << ", but received " << to_string(result.ok());
|
LOG(ERROR) << "Expected " << input_group_call_id << ", but received " << to_string(result.ok());
|
||||||
result = Status::Error(500, "Receive another group call");
|
result = Status::Error(500, "Receive another group call");
|
||||||
|
} else {
|
||||||
|
process_group_call_participants(input_group_call_id, std::move(result.ok_ref()->participants_), false);
|
||||||
|
|
||||||
|
auto participants_it = group_call_participants_.find(input_group_call_id);
|
||||||
|
if (participants_it != group_call_participants_.end()) {
|
||||||
|
CHECK(participants_it->second != nullptr);
|
||||||
|
if (participants_it->second->next_offset.empty()) {
|
||||||
|
participants_it->second->next_offset = std::move(result.ok_ref()->participants_next_offset_);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -651,11 +661,13 @@ void GroupCallManager::on_get_group_call_participants(
|
||||||
if (is_load) {
|
if (is_load) {
|
||||||
// TODO use count
|
// TODO use count
|
||||||
auto participants_it = group_call_participants_.find(input_group_call_id);
|
auto participants_it = group_call_participants_.find(input_group_call_id);
|
||||||
if (participants_it != group_call_participants_.end() && participants_it->second->next_offset == offset) {
|
if (participants_it != group_call_participants_.end()) {
|
||||||
CHECK(participants_it->second != nullptr);
|
CHECK(participants_it->second != nullptr);
|
||||||
|
if (participants_it->second->next_offset == offset) {
|
||||||
participants_it->second->next_offset = std::move(participants->next_offset_);
|
participants_it->second->next_offset = std::move(participants->next_offset_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupCallManager::on_update_group_call_participants(
|
void GroupCallManager::on_update_group_call_participants(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user