MCPcopy
hub / github.com/livekit/livekit / ValidateCreateRoom

Method ValidateCreateRoom

pkg/service/roomallocator.go:175–184  ·  view source on GitHub ↗
(ctx context.Context, roomName livekit.RoomName)

Source from the content-addressed store, hash-verified

173}
174
175func (r *StandardRoomAllocator) ValidateCreateRoom(ctx context.Context, roomName livekit.RoomName) error {
176 // when auto create is disabled, we'll check to ensure it's already created
177 if !r.config.Room.AutoCreate && EnsureCreatePermission(ctx) != nil {
178 _, _, err := r.roomStore.LoadRoom(ctx, roomName, false)
179 if err != nil {
180 return err
181 }
182 }
183 return nil
184}
185
186func applyDefaultRoomConfig(room *livekit.Room, internal *livekit.RoomInternal, conf *config.RoomConfig) {
187 room.EmptyTimeout = conf.EmptyTimeout

Callers

nothing calls this directly

Calls 2

EnsureCreatePermissionFunction · 0.85
LoadRoomMethod · 0.65

Tested by

no test coverage detected