diff --git a/CHANGELOG.md b/CHANGELOG.md index d79fb14..66c846a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Support calling `/api/v1/accounts/search` with `resolve` parameter. - Created `/api/v1/accounts/aliases/all` API endpoint. - Created API endpoint for adding aliases. +- Populate `alsoKnownAs` property on actor object with declared aliases. ### Changed diff --git a/src/activitypub/actors/types.rs b/src/activitypub/actors/types.rs index 493a843..3ae1ce8 100644 --- a/src/activitypub/actors/types.rs +++ b/src/activitypub/actors/types.rs @@ -357,6 +357,7 @@ pub fn get_local_actor( let attachment = attach_extra_field(field); attachments.push(attachment); }; + let aliases = user.profile.aliases.clone().into_actor_ids(); let actor = Actor { context: Some(json!(build_actor_context())), id: actor_id.clone(), @@ -372,7 +373,7 @@ pub fn get_local_actor( icon: avatar, image: banner, summary: user.profile.bio.clone(), - also_known_as: None, + also_known_as: Some(json!(aliases)), attachment: attachments, manually_approves_followers: false, tag: vec![],