diff --git a/src/routes/activitypub/application.rs b/src/routes/activitypub/application.rs index 90de4dc1..451885ae 100644 --- a/src/routes/activitypub/application.rs +++ b/src/routes/activitypub/application.rs @@ -31,7 +31,7 @@ pub async fn view( .set_preferred_username(Some(ctx.domain())) .set_public_key(apb::Node::object( serde_json::Value::new_object() - .set_id(Some(&url!(ctx, "/#main-key"))) + .set_id(Some(&url!(ctx, "#main-key"))) .set_owner(Some(&url!(ctx, ""))) .set_public_key_pem(&ctx.app().public_key) )) diff --git a/src/server/context.rs b/src/server/context.rs index aae2a6a1..112f59b4 100644 --- a/src/server/context.rs +++ b/src/server/context.rs @@ -84,7 +84,7 @@ impl Context { } pub fn base(&self) -> String { - format!("{}{}/", self.0.protocol, self.0.domain) + format!("{}{}", self.0.protocol, self.0.domain) } pub fn uri(&self, entity: &str, id: String) -> String { diff --git a/src/server/dispatcher.rs b/src/server/dispatcher.rs index be80f167..e7d22d92 100644 --- a/src/server/dispatcher.rs +++ b/src/server/dispatcher.rs @@ -92,7 +92,7 @@ async fn worker(db: DatabaseConnection, domain: String, poll_interval: u64, mut }, }; - let key = if delivery.actor == format!("https://{domain}/") { + let key = if delivery.actor == format!("https://{domain}") { let Some(model::application::Model { private_key: key, .. }) = model::application::Entity::find() .one(&db).await? else {