From 120edd84fed66b61a4ca1f80cf05274f57cedd99 Mon Sep 17 00:00:00 2001 From: Benjamin Pracht Date: Fri, 20 Sep 2024 12:14:33 -0700 Subject: [PATCH 1/2] Implement Validate on TransferSIPParticipantRequest --- livekit/sip.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 +} From 1a27dadca083912f1d2c8dd06d779498c4ad4b1f Mon Sep 17 00:00:00 2001 From: Benjamin Pracht Date: Fri, 20 Sep 2024 12:15:52 -0700 Subject: [PATCH 2/2] Create lemon-rats-compare.md --- .changeset/lemon-rats-compare.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/lemon-rats-compare.md 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