mirror of
https://github.com/livekit/livekit.git
synced 2026-11-23 02:29:22 +00:00
When an agent sends a text stream header or chat message under another participant's identity, the SFU keeps that identity on the packet but stamps the agent's own identity on the stream's chunks and trailer. Receivers can't tell which participant the rest of the stream should come from. Set DataPacket.sender in exactly those cases: sender_identity with the agent's identity, or sender_hidden when the agent is hidden. Every other packet has sender cleared, so clients can't forge it. Bump the protocol to 20 so clients can tell the server sets sender whenever participant_identity isn't the real sender.