From c7f09c48faae91d3bf3b8c655fb7772b1cdec3c6 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Thu, 26 Sep 2024 15:34:00 +0530 Subject: [PATCH] Convert to lower case as enum string could be upper case. (#825) --- 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":