chore(web): warns
This commit is contained in:
parent
3db892f038
commit
014da01982
4 changed files with 2 additions and 15 deletions
|
@ -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) {
|
async fn send_follow_response(kind: apb::ActivityType, target: String, to: String, auth: Auth) {
|
||||||
let payload = apb::new()
|
let payload = apb::new()
|
||||||
.set_activity_type(Some(kind))
|
.set_activity_type(Some(kind))
|
||||||
|
|
|
@ -115,16 +115,3 @@ async fn send_follow_response(kind: apb::ActivityType, target: String, to: Strin
|
||||||
tracing::error!("failed posting follow response: {e}");
|
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}");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use crate::prelude::*;
|
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn AboutPage() -> impl IntoView {
|
pub fn AboutPage() -> impl IntoView {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use apb::{ActivityMut, ActorMut, Object, ObjectMut};
|
use apb::{ActivityMut, Object, ObjectMut};
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use crate::{prelude::*, DEFAULT_COLOR};
|
use crate::{prelude::*, DEFAULT_COLOR};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue