Skip to content

Commit

Permalink
set nonce only if not set already
Browse files Browse the repository at this point in the history
  • Loading branch information
boks1971 committed Jan 27, 2025
1 parent 2c9472e commit b711a07
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions roomclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ func (c *RoomServiceClient) SendData(ctx context.Context, req *livekit.SendDataR
if err != nil {
return nil, err
}
// add a nonce to enable receiver to de-dupe
req.Nonce = uuid.New().String()
if len(req.Nonce) == 0 {
// add a nonce to enable receiver to de-dupe
req.Nonce = uuid.New().String()
}
return c.roomService.SendData(ctx, req)
}

Expand Down

0 comments on commit b711a07

Please sign in to comment.