From 3b93b7c904e21745ad85ddcc8131f8afc0680944 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 18 Jan 2023 23:17:34 +0100 Subject: [PATCH] activitypub: allow more schemas for action's `to` field --- src/activitypub.rs | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/activitypub.rs b/src/activitypub.rs index 2031fa5..8534fd1 100644 --- a/src/activitypub.rs +++ b/src/activitypub.rs @@ -34,7 +34,7 @@ pub struct Action { pub action_type: String, pub id: String, pub actor: String, - pub to: Option, + pub to: Option, pub object: Option, } diff --git a/src/main.rs b/src/main.rs index 0ab9d1b..43e035e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -167,7 +167,7 @@ async fn post_relay( jsonld_context: serde_json::Value::String("https://www.w3.org/ns/activitystreams".to_string()), action_type: "Accept".to_string(), actor: target.uri(), - to: Some(endpoint.actor.id.clone()), + to: Some(json!(endpoint.actor.id.clone())), id: action.id, object: Some(endpoint.payload), };