Allow /rtc/validate to return room not found message (#1344)

It's not always possible for WebSocket clients to obtain status code or
error messages returned during WS Upgrade. Moving autocreation validation
to an explicit interface in the validation step so the /rtc/validate
would be able to return an appropriate message.
This commit is contained in:
David Zhao
2023-01-29 21:41:44 -08:00
committed by GitHub
parent 21f816d23c
commit 9a1f4ab18b
4 changed files with 105 additions and 17 deletions
+1
View File
@@ -60,4 +60,5 @@ type IngressStore interface {
//counterfeiter:generate . RoomAllocator
type RoomAllocator interface {
CreateRoom(ctx context.Context, req *livekit.CreateRoomRequest) (*livekit.Room, error)
ValidateCreateRoom(ctx context.Context, roomName livekit.RoomName) error
}