aboutsummaryrefslogtreecommitdiff
path: root/src/model/channel/private_channel.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-01-01 15:55:46 -0800
committerZeyla Hellyer <[email protected]>2018-01-01 15:55:46 -0800
commit25dddb6695109eeead9e19593cb85a22096c2c7a (patch)
treed68d78d210a2804d10027035163871bf806c7e23 /src/model/channel/private_channel.rs
parentGive hyper Response in HTTP errors (diff)
downloadserenity-25dddb6695109eeead9e19593cb85a22096c2c7a.tar.xz
serenity-25dddb6695109eeead9e19593cb85a22096c2c7a.zip
Implement or derive Serialize on all models
Diffstat (limited to 'src/model/channel/private_channel.rs')
-rw-r--r--src/model/channel/private_channel.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/model/channel/private_channel.rs b/src/model/channel/private_channel.rs
index c9b6524..877fa13 100644
--- a/src/model/channel/private_channel.rs
+++ b/src/model/channel/private_channel.rs
@@ -11,7 +11,7 @@ use http::AttachmentType;
use internal::RwLockExt;
/// A Direct Message text channel with another user.
-#[derive(Clone, Debug, Deserialize)]
+#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PrivateChannel {
/// The unique Id of the private channel.
///
@@ -31,7 +31,9 @@ pub struct PrivateChannel {
#[serde(rename = "type")]
pub kind: ChannelType,
/// The recipient to the private channel.
- #[serde(deserialize_with = "deserialize_single_recipient", rename = "recipients")]
+ #[serde(deserialize_with = "deserialize_single_recipient",
+ rename = "recipients",
+ serialize_with = "serialize_sync_user")]
pub recipient: Arc<RwLock<User>>,
}