Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/data-packet-sender-identity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"github.com/livekit/protocol": patch
"@livekit/protocol": patch
---

Add a `sender` oneof (`sender_identity` / `sender_hidden`) to `DataPacket`, which the SFU sets to the real sender when an agent sends a packet on behalf of another participant
69 changes: 64 additions & 5 deletions livekit/livekit_models.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion protobufs/livekit_models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,19 @@ message DataPacket {
// sid of the user that sent the message
string participant_sid = 17;

// NEXT_ID: 19
// The participant that actually sent this packet, when `participant_identity` names a different
// participant (an agent sending a text stream or chat message on behalf of another participant).
// Set only by the SFU, which clears any value a client sends; unset when `participant_identity` is
// the real sender. Available from server protocol 20.
oneof sender {
// identity of the participant that actually sent this packet
string sender_identity = 19;
// the participant that actually sent this packet is hidden, so its identity is withheld; only
// ever true
bool sender_hidden = 20;
}

// NEXT_ID: 21
Comment on lines +474 to +486

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for reviewers: I am assuming currently I am ok to keep this non optional because it would be paired with a SFU protocol version bump.

But I'm not 100% sure about that, is the goal that the protobufs in here should remain backwards compatible with older SFU versions as well as the latest?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is fine. The dependencies are updated. If we have to go back to pinning a different hash, will have to change the corresponding code.

}

message EncryptedPacket {
Expand Down
Loading