Skip to content

Commit

Permalink
Convert to lower case as enum string could be upper case.
Browse files Browse the repository at this point in the history
  • Loading branch information
boks1971 committed Sep 26, 2024
1 parent 01b46d7 commit 4ab3cf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions auth/grants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -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":
Expand Down

0 comments on commit 4ab3cf3

Please sign in to comment.