From 696798279eba5aea6b9afbf900638aed9218749a Mon Sep 17 00:00:00 2001 From: cnderrauber Date: Mon, 11 Sep 2023 14:42:48 +0800 Subject: [PATCH] Check destination identites of data message if sid is empty (#2058) --- pkg/rtc/room.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/rtc/room.go b/pkg/rtc/room.go index 53c284e87..d04eb5cf8 100644 --- a/pkg/rtc/room.go +++ b/pkg/rtc/room.go @@ -26,12 +26,13 @@ import ( "go.uber.org/atomic" "google.golang.org/protobuf/proto" + "github.com/pion/sctp" + "github.com/livekit/livekit-server/pkg/sfu/connectionquality" sutils "github.com/livekit/livekit-server/pkg/utils" "github.com/livekit/protocol/livekit" "github.com/livekit/protocol/logger" "github.com/livekit/protocol/utils" - "github.com/pion/sctp" "github.com/livekit/livekit-server/pkg/config" "github.com/livekit/livekit-server/pkg/routing" @@ -1299,7 +1300,7 @@ func BroadcastDataPacketForRoom(r types.Room, source types.LocalParticipant, dp if source != nil && op.ID() == source.ID() { continue } - if len(dest) > 0 { + if len(dest) > 0 || len(destIdentities) > 0 { found := false for _, dID := range dest { if op.ID() == livekit.ParticipantID(dID) {