diff --git a/src/models/follows.rs b/src/models/follows.rs index 4ad867ce..90f52c51 100644 --- a/src/models/follows.rs +++ b/src/models/follows.rs @@ -30,7 +30,7 @@ impl Follow { /// from -> The one sending the follow request /// target -> The target of the request, responding with Accept - pub fn accept_follow( + pub fn accept_follow( conn: &PgConnection, from: &B, target: &A, @@ -44,6 +44,10 @@ impl Follow { }); let mut accept = Accept::default(); + let accept_id = format!("{}#accept", follow.object_props.id_string().unwrap_or(String::new())); + accept.object_props.set_id_string(accept_id).expect("accept_follow: id error"); + accept.object_props.set_to_link(from.clone().into_id()).expect("accept_follow: to error"); + accept.object_props.set_cc_link_vec::(vec![]).expect("accept_follow: cc error"); accept.accept_props.set_actor_link::(target.clone().into_id()).unwrap(); accept.accept_props.set_object_object(follow).unwrap(); broadcast(&*target, accept, vec![from.clone()]);