Fix nil source panic when broadcasting unlabeled data messages

This commit is contained in:
Théo Monnom committed 2026-10-31 00:41:50 -07:00
1 parent 09a0091e9d
commit efb95b46f7
1 file changed
+5 -1
+5 -1
View File
@@ -2180,12 +2180,16 @@ func BroadcastDataPacketForRoom(
}
func BroadcastDataMessageForRoom(r types.Room, source types.LocalParticipant, data []byte, logger logger.Logger) {
var sender livekit.ParticipantIdentity
if source != nil {
sender = source.Identity()
}
utils.ParallelExec(r.GetLocalParticipants(), dataForwardLoadBalanceThreshold, 1, func(op types.LocalParticipant) {
if source != nil && op.ID() == source.ID() {
return
}
op.SendDataMessageUnlabeled(data, false, source.Identity())
op.SendDataMessageUnlabeled(data, false, sender)
})
}