Skip to content

Commit

Permalink
Implement Validate on TransferSIPParticipantRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
biglittlebigben committed Sep 20, 2024
1 parent 71b9c18 commit 120edd8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions livekit/sip.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,17 @@ func (p *CreateSIPParticipantRequest) Validate() error {
}
return nil
}

func (p *TransferSIPParticipantRequest) Validate() error {
if p.RoomName == "" {
return errors.New("missing room name")
}
if p.ParticipantIdentity == "" {
return errors.New("missing participant identity")
}
if p.TransferTo == "" {
return errors.New("missing transfer to")
}

return nil
}

0 comments on commit 120edd8

Please sign in to comment.