Skip to content

Commit 766efae

Browse files
authored
normalize common os names (#1118)
* normalize common os names * Create lemon-yaks-rescue.md * update schema
1 parent c18f054 commit 766efae

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.changeset/lemon-yaks-rescue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@livekit/protocol": patch
3+
---
4+
5+
normalize common os names

observability/roomobs/gen_reporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"time"
77
)
88

9-
const Version_KRKF8G0 = true
9+
const Version_LNTFR10 = true
1010

1111
type KeyResolver interface {
1212
Resolve(string)

observability/roomobs/room.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ func UnpackCountryCode(code uint16) (isoAlpha2 string) {
2929
}
3030

3131
func ToClientOS(os string) ClientOS {
32+
os = strings.ToLower(os)
33+
3234
switch os {
3335
case "":
3436
return ClientOSUndefined
@@ -38,9 +40,9 @@ func ToClientOS(os string) ClientOS {
3840
return ClientOSAndroid
3941
case "windows":
4042
return ClientOSWindows
41-
case "mac":
43+
case "mac", "mac os x", "darwin", "macos":
4244
return ClientOSMac
43-
case "linux":
45+
case "linux", "chrome os":
4446
return ClientOSLinux
4547
default:
4648
return ClientOSUndefined

0 commit comments

Comments
 (0)