groupCallParticipantCount method
returns the user count (not sessions, yet) for the group call with id: groupCallId
.
returns 0 if group call not found
Implementation
int? groupCallParticipantCount(String groupCallId) {
int participantCount = 0;
final groupCallMemberStates =
states.tryGetMap<String, Event>(EventTypes.GroupCallMemberPrefix);
if (groupCallMemberStates != null) {
groupCallMemberStates.forEach((userId, memberStateEvent) {
if (!callMemberStateIsExpired(memberStateEvent, groupCallId)) {
participantCount++;
}
});
}
return participantCount;
}