Do not allow to join finished calls.

This commit is contained in:
levlam 2020-12-07 00:59:53 +03:00
parent d4e6c3724d
commit 8dff5ed65b

View File

@ -615,6 +615,9 @@ void GroupCallManager::join_group_call(GroupCallId group_call_id,
CHECK(group_call->is_inited);
return promise.set_error(Status::Error(400, "Group call is already joined"));
}
if (group_call->is_inited && !group_call->is_active) {
return promise.set_error(Status::Error(400, "Group call is finished"));
}
if (pending_join_requests_.count(input_group_call_id)) {
auto it = pending_join_requests_.find(input_group_call_id);