package hub // AdmittedCount is how many participations are admitted in the room — // the one number the drive surface reads back out of a live meeting // (spec §8.2: the count of admitted peers, never their names or the // chat). A room nobody has opened answers zero, which is what a // meeting with no room actually means; the caller already knows the // meeting exists, so there is nothing to distinguish. // // Taken under the hub's own lock, like every other reader, and built // on admittedCountLocked so the API and the mesh cap can never // disagree about what "admitted" counts. func (h *Hub) AdmittedCount(sqid string) int { h.mu.Lock() defer h.mu.Unlock() r, ok := h.rooms[sqid] if !ok { return 0 } return admittedCountLocked(r) }