Skip to content

Commit

Permalink
fix(pickup-messages): Add thread decorator all over (needed somewher …
Browse files Browse the repository at this point in the history
…in aries-vcx)

Signed-off-by: Naian <[email protected]>
  • Loading branch information
nain-F49FF806 committed Oct 18, 2023
1 parent d5c7228 commit ff56ea8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;

use crate::{decorators::transport::Transport, msg_parts::MsgParts};
use crate::{
decorators::{thread::Thread, transport::Transport},
msg_parts::MsgParts,
};

pub type LiveDeliveryChange = MsgParts<LiveDeliveryChangeContent, LiveDeliveryChangeDecorators>;

Expand All @@ -16,6 +19,10 @@ pub struct LiveDeliveryChangeDecorators {
#[serde(rename = "~transport")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transport: Option<Transport>,
#[builder(default, setter(strip_option))]
#[serde(rename = "~thread")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thread: Option<Thread>,
}

#[cfg(test)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;

use crate::{decorators::transport::Transport, msg_parts::MsgParts};
use crate::{
decorators::{thread::Thread, transport::Transport},
msg_parts::MsgParts,
};

pub type MessagesReceived = MsgParts<MessagesReceivedContent, MessagesReceivedDecorators>;

Expand All @@ -16,6 +19,10 @@ pub struct MessagesReceivedDecorators {
#[serde(rename = "~transport")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transport: Option<Transport>,
#[builder(default, setter(strip_option))]
#[serde(rename = "~thread")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thread: Option<Thread>,
}

#[cfg(test)]
Expand Down
9 changes: 8 additions & 1 deletion messages/src/msg_fields/protocols/pickup/status.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;

use crate::{decorators::transport::Transport, msg_parts::MsgParts};
use crate::{
decorators::{thread::Thread, transport::Transport},
msg_parts::MsgParts,
};

pub type Status = MsgParts<StatusContent, StatusDecorators>;

Expand All @@ -19,6 +22,10 @@ pub struct StatusDecorators {
#[serde(rename = "~transport")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transport: Option<Transport>,
#[builder(default, setter(strip_option))]
#[serde(rename = "~thread")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thread: Option<Thread>,
}

#[cfg(test)]
Expand Down
9 changes: 8 additions & 1 deletion messages/src/msg_fields/protocols/pickup/status_request.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;

use crate::{decorators::transport::Transport, msg_parts::MsgParts};
use crate::{
decorators::{thread::Thread, transport::Transport},
msg_parts::MsgParts,
};

pub type StatusRequest = MsgParts<StatusRequestContent, StatusRequestDecorators>;

Expand All @@ -18,6 +21,10 @@ pub struct StatusRequestDecorators {
#[serde(rename = "~transport")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transport: Option<Transport>,
#[builder(default, setter(strip_option))]
#[serde(rename = "~thread")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thread: Option<Thread>,
}

#[cfg(test)]
Expand Down

0 comments on commit ff56ea8

Please sign in to comment.