From 4ab3cf3e32326c19520d3e6e60279483ef47240c Mon Sep 17 00:00:00 2001 From: boks1971 Date: Thu, 26 Sep 2024 15:30:11 +0530 Subject: [PATCH] Convert to lower case as enum string could be upper case. --- auth/grants.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/grants.go b/auth/grants.go index c8a14df3..4356ff88 100644 --- a/auth/grants.go +++ b/auth/grants.go @@ -317,7 +317,7 @@ func sourceToString(source livekit.TrackSource) string { } func sourceToProto(sourceStr string) livekit.TrackSource { - switch sourceStr { + switch strings.ToLower(sourceStr) { case "camera": return livekit.TrackSource_CAMERA case "microphone": @@ -336,7 +336,7 @@ func kindFromProto(source livekit.ParticipantInfo_Kind) string { } func kindToProto(sourceStr string) livekit.ParticipantInfo_Kind { - switch sourceStr { + switch strings.ToLower(sourceStr) { case "", "standard": return livekit.ParticipantInfo_STANDARD case "ingress":