Improve loadGroupCallPartiicpants documentation.

This commit is contained in:
levlam 2020-12-15 13:40:04 +03:00
parent c73fc71744
commit 42f36d2d66
2 changed files with 6 additions and 1 deletions

View File

@ -4387,7 +4387,9 @@ toggleGroupCallParticipantIsMuted group_call_id:int32 user_id:int32 is_muted:Boo
//@description Checks whether a group call is still joined. Should be called every 10 seconds when tgcalls notifies about lost connection with the server @group_call_id Group call identifier
checkGroupCallIsJoined group_call_id:int32 = Ok;
//@description Loads more group call participants. The loaded participants will be received through updates @group_call_id Group call identifier @limit Maximum number of participants to load
//@description Loads more group call participants. The loaded participants will be received through updates. Use the field groupCall.loaded_all_participants to check whether all participants has already been loaded
//@group_call_id Group call identifier. The group call must be previously received through getGroupCall and must be joined or being joined
//@limit Maximum number of participants to load
loadGroupCallParticipants group_call_id:int32 limit:int32 = Ok;
//@description Leaves a group call @group_call_id Group call identifier

View File

@ -1465,6 +1465,9 @@ void GroupCallManager::load_group_call_participants(GroupCallId group_call_id, i
}
auto *group_call = get_group_call(input_group_call_id);
CHECK(group_call != nullptr && group_call->is_inited);
if (group_call->loaded_all_participants) {
return promise.set_value(Unit());
}
string next_offset;
auto participants_it = group_call_participants_.find(input_group_call_id);