Skip to content

Commit

Permalink
ignore unknown fields on webhook receiver & update proto (#290)
Browse files Browse the repository at this point in the history
* fix: webhook body serde decode error due to missing field

* update proto & ignore unknown fields

---------

Co-authored-by: Victor A <[email protected]>
  • Loading branch information
theomonnom and cs50victor authored Jan 15, 2024
1 parent 53734b1 commit decca08
Show file tree
Hide file tree
Showing 4 changed files with 626 additions and 122 deletions.
3 changes: 2 additions & 1 deletion livekit-protocol/generate_proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ protoc \
--prost_opt=compile_well_known_types \
--prost_opt=extern_path=.google.protobuf=::pbjson_types \
--prost-serde_out=$OUT_RUST \
--prost-serde_opt=ignore_unknown_fields \
$PROTOCOL/livekit_egress.proto \
$PROTOCOL/livekit_rtc.proto \
$PROTOCOL/livekit_room.proto \
$PROTOCOL/livekit_webhook.proto \
$PROTOCOL/livekit_models.proto
$PROTOCOL/livekit_models.proto
4 changes: 4 additions & 0 deletions livekit-protocol/src/livekit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ pub struct Room {
pub num_publishers: u32,
#[prost(bool, tag="10")]
pub active_recording: bool,
#[prost(message, optional, tag="13")]
pub version: ::core::option::Option<TimedVersion>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down Expand Up @@ -274,6 +276,8 @@ pub struct TrackInfo {
pub encryption: i32,
#[prost(string, tag="17")]
pub stream: ::prost::alloc::string::String,
#[prost(message, optional, tag="18")]
pub version: ::core::option::Option<TimedVersion>,
}
/// provide information about available spatial layers
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
Loading

0 comments on commit decca08

Please sign in to comment.