Populate alsoKnownAs property on actor object with declared aliases
This commit is contained in:
parent
99f6c08e9a
commit
b0bf3cf594
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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![],
|
||||
|
|
Loading…
Reference in a new issue