move CanPublishData check to DataTrack (#490)
* move CanPublishData check to DataTrack * fix test
This commit is contained in:
@@ -642,10 +642,6 @@ func (r *Room) onParticipantMetadataUpdate(p types.LocalParticipant) {
|
||||
}
|
||||
|
||||
func (r *Room) onDataPacket(source types.LocalParticipant, dp *livekit.DataPacket) {
|
||||
// don't forward if source isn't allowed to publish data
|
||||
if source != nil && !source.CanPublishData() {
|
||||
return
|
||||
}
|
||||
dest := dp.GetUser().GetDestinationSids()
|
||||
|
||||
for _, op := range r.GetParticipants() {
|
||||
|
||||
Reference in New Issue
Block a user