From 06d216c7ed82de02510060203e205bc71e1c3418 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Tue, 3 May 2022 00:43:47 +0900 Subject: [PATCH] Remove unused Follow::accept_follow() --- plume-models/src/follows.rs | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) 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>(