diff --git a/plume-models/src/follows.rs b/plume-models/src/follows.rs index 910942c1..dff962e4 100644 --- a/plume-models/src/follows.rs +++ b/plume-models/src/follows.rs @@ -11,7 +11,7 @@ use activitystreams::{ }; use diesel::{self, ExpressionMethods, QueryDsl, RunQueryDsl, SaveChangesDsl}; use plume_common::activity_pub::{ - broadcast, broadcast07, + broadcast07, inbox::{AsActor, AsObject, FromId}, sign::Signer, Id, IntoId, PUBLIC_VISIBILITY, @@ -98,36 +98,6 @@ impl Follow { Ok(()) } - /// from -> The one sending the follow request - /// target -> The target of the request, responding with Accept - pub fn accept_follow + IntoId, T>( - conn: &Connection, - from: &B, - target: &A, - follow: FollowAct, - from_id: i32, - target_id: i32, - ) -> Result { - let res = Follow::insert( - conn, - NewFollow { - follower_id: from_id, - following_id: target_id, - ap_url: follow.object_props.id_string()?, - }, - )?; - res.notify(conn)?; - - let accept = res.build_accept(from, target, follow)?; - broadcast( - &*target, - accept, - vec![from.clone()], - CONFIG.proxy().cloned(), - ); - Ok(res) - } - /// from -> The one sending the follow request /// target -> The target of the request, responding with Accept pub fn accept_follow07 + IntoId, T>(