| 151 | } |
| 152 | |
| 153 | func (s *LocalStore) LoadParticipant(_ context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) (*livekit.ParticipantInfo, error) { |
| 154 | s.lock.RLock() |
| 155 | defer s.lock.RUnlock() |
| 156 | |
| 157 | roomParticipants := s.participants[roomName] |
| 158 | if roomParticipants == nil { |
| 159 | return nil, ErrParticipantNotFound |
| 160 | } |
| 161 | participant := roomParticipants[identity] |
| 162 | if participant == nil { |
| 163 | return nil, ErrParticipantNotFound |
| 164 | } |
| 165 | return participant, nil |
| 166 | } |
| 167 | |
| 168 | func (s *LocalStore) HasParticipant(ctx context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) (bool, error) { |
| 169 | p, err := s.LoadParticipant(ctx, roomName, identity) |