Make name property optional on actor object
This commit is contained in:
parent
93b703ba2f
commit
263fae8039
3 changed files with 6 additions and 5 deletions
|
@ -60,7 +60,8 @@ pub struct Actor {
|
|||
#[serde(rename = "type")]
|
||||
object_type: String,
|
||||
|
||||
pub name: String,
|
||||
pub name: Option<String>,
|
||||
|
||||
pub preferred_username: String,
|
||||
pub inbox: String,
|
||||
pub outbox: String,
|
||||
|
@ -200,7 +201,7 @@ pub fn get_local_actor(
|
|||
])),
|
||||
id: actor_id.clone(),
|
||||
object_type: PERSON.to_string(),
|
||||
name: username.to_string(),
|
||||
name: user.profile.display_name.clone(),
|
||||
preferred_username: username.to_string(),
|
||||
inbox,
|
||||
outbox,
|
||||
|
@ -236,7 +237,7 @@ pub fn get_instance_actor(
|
|||
])),
|
||||
id: actor_id,
|
||||
object_type: SERVICE.to_string(),
|
||||
name: instance.host(),
|
||||
name: Some(instance.host()),
|
||||
preferred_username: instance.host(),
|
||||
inbox: actor_inbox,
|
||||
outbox: actor_outbox,
|
||||
|
|
|
@ -144,7 +144,7 @@ pub async fn fetch_profile_by_actor_id(
|
|||
);
|
||||
let profile_data = ProfileCreateData {
|
||||
username: actor.preferred_username,
|
||||
display_name: Some(actor.name),
|
||||
display_name: actor.name,
|
||||
acct: actor_address,
|
||||
bio: actor.summary,
|
||||
avatar,
|
||||
|
|
|
@ -493,7 +493,7 @@ pub async fn receive_activity(
|
|||
.map_err(|_| ValidationError("failed to fetch image"))?;
|
||||
let extra_fields = actor.extra_fields();
|
||||
let mut profile_data = ProfileUpdateData {
|
||||
display_name: Some(actor.name),
|
||||
display_name: actor.name,
|
||||
bio: actor.summary.clone(),
|
||||
bio_source: actor.summary,
|
||||
avatar,
|
||||
|
|
Loading…
Reference in a new issue