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.
|
- Support calling `/api/v1/accounts/search` with `resolve` parameter.
|
||||||
- Created `/api/v1/accounts/aliases/all` API endpoint.
|
- Created `/api/v1/accounts/aliases/all` API endpoint.
|
||||||
- Created API endpoint for adding aliases.
|
- Created API endpoint for adding aliases.
|
||||||
|
- Populate `alsoKnownAs` property on actor object with declared aliases.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
@ -357,6 +357,7 @@ pub fn get_local_actor(
|
||||||
let attachment = attach_extra_field(field);
|
let attachment = attach_extra_field(field);
|
||||||
attachments.push(attachment);
|
attachments.push(attachment);
|
||||||
};
|
};
|
||||||
|
let aliases = user.profile.aliases.clone().into_actor_ids();
|
||||||
let actor = Actor {
|
let actor = Actor {
|
||||||
context: Some(json!(build_actor_context())),
|
context: Some(json!(build_actor_context())),
|
||||||
id: actor_id.clone(),
|
id: actor_id.clone(),
|
||||||
|
@ -372,7 +373,7 @@ pub fn get_local_actor(
|
||||||
icon: avatar,
|
icon: avatar,
|
||||||
image: banner,
|
image: banner,
|
||||||
summary: user.profile.bio.clone(),
|
summary: user.profile.bio.clone(),
|
||||||
also_known_as: None,
|
also_known_as: Some(json!(aliases)),
|
||||||
attachment: attachments,
|
attachment: attachments,
|
||||||
manually_approves_followers: false,
|
manually_approves_followers: false,
|
||||||
tag: vec![],
|
tag: vec![],
|
||||||
|
|
Loading…
Reference in a new issue