From 424859772a4824685c1f02cad4778d581329e5cd Mon Sep 17 00:00:00 2001 From: silverpill Date: Tue, 24 May 2022 17:55:26 +0000 Subject: [PATCH] Add summary (bio) to local actor objects --- src/activitypub/actor.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/activitypub/actor.rs b/src/activitypub/actor.rs index 837a131..637938a 100644 --- a/src/activitypub/actor.rs +++ b/src/activitypub/actor.rs @@ -306,7 +306,7 @@ pub fn get_local_actor( capabilities: Some(capabilities), icon: avatar, image: banner, - summary: None, + summary: user.profile.bio.clone(), attachment: Some(attachments), url: Some(actor_id), }; @@ -366,6 +366,7 @@ mod tests { let private_key_pem = serialize_private_key(&private_key).unwrap(); let profile = DbActorProfile { username: "testuser".to_string(), + bio: Some("testbio".to_string()), ..Default::default() }; let user = User { @@ -377,5 +378,6 @@ mod tests { assert_eq!(actor.id, "https://example.com/users/testuser"); assert_eq!(actor.preferred_username, user.profile.username); assert_eq!(actor.attachment.unwrap().len(), 0); + assert_eq!(actor.summary, user.profile.bio); } }