chore(web): warns

This commit is contained in:
əlemi 2024-06-12 15:21:10 +02:00
parent 3db892f038
commit 014da01982
Signed by: alemi
GPG key ID: A4895B84D311642C
4 changed files with 2 additions and 15 deletions

View file

@ -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))

View file

@ -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::<Auth>().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}");
}
})
}

View file

@ -1,5 +1,4 @@
use leptos::*;
use crate::prelude::*;
#[component]
pub fn AboutPage() -> impl IntoView {

View file

@ -1,4 +1,4 @@
use apb::{ActivityMut, ActorMut, Object, ObjectMut};
use apb::{ActivityMut, Object, ObjectMut};
use leptos::*;
use crate::{prelude::*, DEFAULT_COLOR};