HTTP DELETE of participant session (#3819)

This commit is contained in:
Raja Subramanian
2025-07-24 23:02:45 +05:30
committed by GitHub
parent 01de0e365f
commit a7ce138239
5 changed files with 83 additions and 8 deletions
+21
View File
@@ -224,3 +224,24 @@ func (s signalv2ParticipantService) RelaySignalv2Participant(ctx context.Context
WireMessage: wireMessage,
}, nil
}
func (s signalv2ParticipantService) RelaySignalv2ParticipantDeleteSession(
ctx context.Context,
req *rpc.RelaySignalv2ParticipantDeleteSessionRequest,
) (*emptypb.Empty, error) {
room := s.RoomManager.GetRoom(ctx, livekit.RoomName(req.Room))
if room == nil {
return nil, ErrRoomNotFound
}
lp := room.GetParticipantByID(livekit.ParticipantID(req.ParticipantId))
if lp != nil {
room.RemoveParticipant(
lp.Identity(),
lp.ID(),
types.ParticipantCloseReasonClientRequestLeave,
)
}
return &emptypb.Empty{}, nil
}