code: func (s *SessionRegistry) getParties(sess *session) []*party {
  	var parties []*party
  
  	if sess == nil {
  		return parties
  	}
  
  	sess.Lock()
  	defer sess.Unlock()
  
  	for _, p := range sess.parties {
  		parties = append(parties, p)
  	}
  
  	return parties
  }
docs: // getParties allows to safely return a list of parties connected to this
  // session (as determined by ctx)