From 0a1edba4b079a085fc5a7f223432c2f8f374deb7 Mon Sep 17 00:00:00 2001 From: Bat Date: Sat, 23 Jun 2018 15:00:35 +0100 Subject: [PATCH] Fix the custom properties deserialization bug for Blogs as well --- src/models/blogs.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/models/blogs.rs b/src/models/blogs.rs index 2d972c9e..4c61882b 100644 --- a/src/models/blogs.rs +++ b/src/models/blogs.rs @@ -113,7 +113,10 @@ impl Blog { .send(); match req { Ok(mut res) => { - let json = serde_json::from_str(&res.text().unwrap()).unwrap(); + let text = &res.text().unwrap(); + let ap_sign: ApSignature = serde_json::from_str(text).unwrap(); + let mut json: CustomGroup = serde_json::from_str(text).unwrap(); + json.custom_props = ap_sign; // without this workaround, publicKey is not correctly deserialized Some(Blog::from_activity(conn, json, Url::parse(url.as_ref()).unwrap().host_str().unwrap().to_string())) }, Err(_) => None