diff --git a/pkg/sfu/session.go b/pkg/sfu/session.go index 76eee20c8..9d7895e73 100644 --- a/pkg/sfu/session.go +++ b/pkg/sfu/session.go @@ -161,6 +161,9 @@ func (s *SessionLocal) AddDatachannel(owner string, dc *webrtc.DataChannel) { s.mu.Lock() for _, lbl := range s.fanOutDCs { if label == lbl { + dc.OnMessage(func(msg webrtc.DataChannelMessage) { + s.FanOutMessage(owner, label, msg) + }) s.mu.Unlock() return }