diff --git a/.changeset/go-sdk-chat.md b/.changeset/go-sdk-chat.md new file mode 100644 index 000000000..fabe69fbd --- /dev/null +++ b/.changeset/go-sdk-chat.md @@ -0,0 +1,5 @@ +--- +"github.com/livekit/protocol": patch +--- + +Go SDK support for chat messages. \ No newline at end of file diff --git a/livekit/types.go b/livekit/types.go index 32edd4e26..4666d67bf 100644 --- a/livekit/types.go +++ b/livekit/types.go @@ -319,3 +319,12 @@ func applyMapDiff(dst *map[string]string, diff map[string]string) { } *dst = m } + +// ToProto implements DataPacket in Go SDK. +func (p *ChatMessage) ToProto() *DataPacket { + return &DataPacket{ + Value: &DataPacket_ChatMessage{ + ChatMessage: p, + }, + } +}