Fix typo in SendData nonce length check. (#3370)

Definitely need new glasses :-(
This commit is contained in:
Raja Subramanian
2025-01-28 09:59:48 +05:30
committed by GitHub
parent 2b5ee12f9b
commit c30204d56c
+1 -1
View File
@@ -235,7 +235,7 @@ func (s *RoomService) SendData(ctx context.Context, req *livekit.SendDataRequest
}
// nonce is either absent or 128-bit UUID
if len(req.Nonce) != 8 && len(req.Nonce) != 16 {
if len(req.Nonce) != 0 && len(req.Nonce) != 16 {
return nil, twirp.NewError(twirp.InvalidArgument, fmt.Sprintf("nonce should be 16-bytes or not present, got: %d bytes", len(req.Nonce)))
}