Set correct primary audience for Update(Person) activities

This commit is contained in:
silverpill 2022-01-04 21:54:41 +00:00
parent de1760230a
commit 81d60656e6

View file

@ -460,7 +460,10 @@ pub fn create_activity_update_person(
UPDATE, UPDATE,
None, None,
actor, actor,
vec![AP_PUBLIC.to_string()], vec![
AP_PUBLIC.to_string(),
get_followers_url(instance_url, &user.profile.username),
],
vec![], vec![],
); );
Ok(activity) Ok(activity)
@ -588,5 +591,6 @@ mod tests {
assert_eq!(activity.object["object"], Value::Null); assert_eq!(activity.object["object"], Value::Null);
assert_eq!(activity.object["content"], Value::Null); assert_eq!(activity.object["content"], Value::Null);
assert_eq!(activity.to.unwrap(), json!([target_actor_id])); assert_eq!(activity.to.unwrap(), json!([target_actor_id]));
assert_eq!(activity.cc.unwrap(), json!([]));
} }
} }