activitypub: allow more schemas for action's to field

This commit is contained in:
Astro 2023-01-18 23:17:34 +01:00
parent b30dfb85d4
commit 3b93b7c904
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ pub struct Action<O> {
pub action_type: String, pub action_type: String,
pub id: String, pub id: String,
pub actor: String, pub actor: String,
pub to: Option<String>, pub to: Option<serde_json::Value>,
pub object: Option<O>, pub object: Option<O>,
} }

View file

@ -167,7 +167,7 @@ async fn post_relay(
jsonld_context: serde_json::Value::String("https://www.w3.org/ns/activitystreams".to_string()), jsonld_context: serde_json::Value::String("https://www.w3.org/ns/activitystreams".to_string()),
action_type: "Accept".to_string(), action_type: "Accept".to_string(),
actor: target.uri(), actor: target.uri(),
to: Some(endpoint.actor.id.clone()), to: Some(json!(endpoint.actor.id.clone())),
id: action.id, id: action.id,
object: Some(endpoint.payload), object: Some(endpoint.payload),
}; };