restore legacy room delete behavior (#2400)

This commit is contained in:
Paul Wells
2024-01-22 05:18:12 -08:00
committed by GitHub
parent cb42c6152c
commit 867325d120
3 changed files with 85 additions and 2 deletions
+8 -1
View File
@@ -28,6 +28,7 @@ import (
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/rpc"
"github.com/livekit/protocol/utils"
"github.com/livekit/psrpc"
)
// A rooms service that supports a single node
@@ -166,7 +167,13 @@ func (s *RoomService) DeleteRoom(ctx context.Context, req *livekit.DeleteRoomReq
return nil, twirpAuthError(err)
}
return s.roomClient.DeleteRoom(ctx, s.topicFormatter.RoomTopic(ctx, livekit.RoomName(req.Room)), req)
_, err := s.roomClient.DeleteRoom(ctx, s.topicFormatter.RoomTopic(ctx, livekit.RoomName(req.Room)), req)
if !errors.Is(err, psrpc.ErrNoResponse) {
return &livekit.DeleteRoomResponse{}, err
}
err = s.roomStore.DeleteRoom(ctx, livekit.RoomName(req.Room))
return &livekit.DeleteRoomResponse{}, err
}
func (s *RoomService) ListParticipants(ctx context.Context, req *livekit.ListParticipantsRequest) (*livekit.ListParticipantsResponse, error) {