(ctx context.Context, req *livekit.RoomParticipantIdentity)
| 222 | } |
| 223 | |
| 224 | func (s *RoomService) RemoveParticipant(ctx context.Context, req *livekit.RoomParticipantIdentity) (*livekit.RemoveParticipantResponse, error) { |
| 225 | RecordRequest(ctx, req) |
| 226 | |
| 227 | AppendLogFields(ctx, "room", req.Room, "participant", req.Identity) |
| 228 | |
| 229 | if err := EnsureAdminPermission(ctx, livekit.RoomName(req.Room)); err != nil { |
| 230 | return nil, twirpAuthError(err) |
| 231 | } |
| 232 | |
| 233 | if os, ok := s.roomStore.(OSSServiceStore); ok { |
| 234 | found, err := os.HasParticipant(ctx, livekit.RoomName(req.Room), livekit.ParticipantIdentity(req.Identity)) |
| 235 | if err != nil { |
| 236 | return nil, err |
| 237 | } else if !found { |
| 238 | return nil, ErrParticipantNotFound |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | res, err := s.participantClient.RemoveParticipant(ctx, s.topicFormatter.ParticipantTopic(ctx, livekit.RoomName(req.Room), livekit.ParticipantIdentity(req.Identity)), req) |
| 243 | RecordResponse(ctx, res) |
| 244 | return res, err |
| 245 | } |
| 246 | |
| 247 | func (s *RoomService) MutePublishedTrack(ctx context.Context, req *livekit.MuteRoomTrackRequest) (*livekit.MuteRoomTrackResponse, error) { |
| 248 | RecordRequest(ctx, req) |
nothing calls this directly
no test coverage detected