diff --git a/.changeset/lemon-rats-compare.md b/.changeset/lemon-rats-compare.md new file mode 100644 index 00000000..58125c57 --- /dev/null +++ b/.changeset/lemon-rats-compare.md @@ -0,0 +1,5 @@ +--- +"@livekit/protocol": patch +--- + +Implement Validate on TransferSIPParticipantRequest diff --git a/livekit/sip.go b/livekit/sip.go index e2871bf9..d7ce71c5 100644 --- a/livekit/sip.go +++ b/livekit/sip.go @@ -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 +}