mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 19:55:41 +00:00
UserPacket sid should be empty for hidden participants (#2469)
This commit is contained in:
@@ -1445,8 +1445,13 @@ func (p *ParticipantImpl) onDataMessage(kind livekit.DataPacket_Kind, data []byt
|
||||
onDataPacket := p.onDataPacket
|
||||
p.lock.RUnlock()
|
||||
if onDataPacket != nil {
|
||||
payload.User.ParticipantSid = string(p.params.SID)
|
||||
payload.User.ParticipantIdentity = string(p.params.Identity)
|
||||
if p.Hidden() {
|
||||
payload.User.ParticipantSid = ""
|
||||
payload.User.ParticipantIdentity = ""
|
||||
} else {
|
||||
payload.User.ParticipantSid = string(p.params.SID)
|
||||
payload.User.ParticipantIdentity = string(p.params.Identity)
|
||||
}
|
||||
onDataPacket(p, &dp)
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user