diff --git a/web/src/actors/header.rs b/web/src/actors/header.rs index a0998709..e8d1f84a 100644 --- a/web/src/actors/header.rs +++ b/web/src/actors/header.rs @@ -105,6 +105,7 @@ pub fn ActorHeader() -> impl IntoView { } } +#[allow(unused)] async fn send_follow_response(kind: apb::ActivityType, target: String, to: String, auth: Auth) { let payload = apb::new() .set_activity_type(Some(kind)) diff --git a/web/src/components/user.rs b/web/src/components/user.rs index 399702d2..d174219e 100644 --- a/web/src/components/user.rs +++ b/web/src/components/user.rs @@ -115,16 +115,3 @@ async fn send_follow_response(kind: apb::ActivityType, target: String, to: Strin tracing::error!("failed posting follow response: {e}"); } } - -fn send_follow_request(target: String) { - let auth = use_context::().expect("missing auth context"); - spawn_local(async move { - let payload = serde_json::Value::Object(serde_json::Map::default()) - .set_activity_type(Some(apb::ActivityType::Follow)) - .set_object(apb::Node::link(target.clone())) - .set_to(apb::Node::links(vec![target])); - if let Err(e) = Http::post(&auth.outbox(), &payload, auth).await { - tracing::error!("failed sending follow request: {e}"); - } - }) -} diff --git a/web/src/page/about.rs b/web/src/page/about.rs index 19f9ab1d..0c0df6a4 100644 --- a/web/src/page/about.rs +++ b/web/src/page/about.rs @@ -1,5 +1,4 @@ use leptos::*; -use crate::prelude::*; #[component] pub fn AboutPage() -> impl IntoView { diff --git a/web/src/page/config.rs b/web/src/page/config.rs index 8095e088..578c812c 100644 --- a/web/src/page/config.rs +++ b/web/src/page/config.rs @@ -1,4 +1,4 @@ -use apb::{ActivityMut, ActorMut, Object, ObjectMut}; +use apb::{ActivityMut, Object, ObjectMut}; use leptos::*; use crate::{prelude::*, DEFAULT_COLOR};