From a8caca8df88b90f8dc059eeee947b98dd68f877d Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Fri, 15 May 2026 11:45:46 +0200 Subject: [PATCH] =?UTF-8?q?fix(bootstrap):=20register=20/inbox=20shared=20?= =?UTF-8?q?inbox=20route=20=E2=80=94=20was=20missing,=20Mastodon=20deliver?= =?UTF-8?q?s=20deletes=20there?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/bootstrap/src/main.rs | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/crates/bootstrap/src/main.rs b/crates/bootstrap/src/main.rs index 1b0e00c..b9e4ffc 100644 --- a/crates/bootstrap/src/main.rs +++ b/crates/bootstrap/src/main.rs @@ -1,12 +1,6 @@ mod config; mod factory; -use activitypub_base::{ - inbox::inbox_handler, - nodeinfo::{nodeinfo_handler, nodeinfo_well_known_handler}, - outbox::outbox_handler, - webfinger::webfinger_handler, -}; use std::net::SocketAddr; use std::sync::Arc; use tower_http::cors::{AllowOrigin, CorsLayer}; @@ -38,6 +32,13 @@ async fn main() { .allow_headers(tower_http::cors::Any) }; + use activitypub_base::{ + followers_handler::{followers_handler, following_handler}, + inbox::inbox_handler, + nodeinfo::{nodeinfo_handler, nodeinfo_well_known_handler}, + outbox::outbox_handler, + webfinger::webfinger_handler, + }; let ap_router = axum::Router::new() .route( "/.well-known/webfinger", @@ -48,6 +49,7 @@ async fn main() { axum::routing::get(nodeinfo_well_known_handler), ) .route("/nodeinfo/2.0", axum::routing::get(nodeinfo_handler)) + .route("/inbox", axum::routing::post(inbox_handler)) .route( "/users/{username}/inbox", axum::routing::post(inbox_handler), @@ -56,6 +58,14 @@ async fn main() { "/users/{username}/outbox", axum::routing::get(outbox_handler), ) + .route( + "/users/{username}/followers", + axum::routing::get(followers_handler), + ) + .route( + "/users/{username}/following", + axum::routing::get(following_handler), + ) .layer(infra.ap_service.federation_config().middleware()); let base = presentation::routes::router()