]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/protocol/activities/private_message/create_or_update.rs
Accept single object as to for arrays too (#2048)
[lemmy.git] / crates / apub / src / protocol / activities / private_message / create_or_update.rs
index a319daff5a545285753e2ed87797e508afef67b0..9558d074a6329b853db5a078539778a895a85c88 100644 (file)
@@ -11,6 +11,7 @@ use url::Url;
 pub struct CreateOrUpdatePrivateMessage {
   pub(crate) id: Url,
   pub(crate) actor: ObjectId<ApubPerson>,
+  #[serde(deserialize_with = "crate::deserialize_one")]
   pub(crate) to: [ObjectId<ApubPerson>; 1],
   pub(crate) object: ChatMessage,
   #[serde(rename = "type")]