diff --git a/src/activitypub.rs b/src/activitypub.rs index 5002eec..1f1417d 100644 --- a/src/activitypub.rs +++ b/src/activitypub.rs @@ -11,7 +11,7 @@ pub struct Actor { pub name: Option, pub icon: Option, pub inbox: String, - pub outbox: String, + pub outbox: Option, #[serde(rename = "publicKey")] pub public_key: ActorPublicKey, #[serde(rename = "preferredUsername")] @@ -49,8 +49,8 @@ impl IntoResponse for Actor { #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Media { #[serde(rename = "type")] - pub media_type: String, + pub media_type: Option, #[serde(rename = "mediaType")] - pub content_type: String, + pub content_type: Option, pub url: String, } diff --git a/src/actor.rs b/src/actor.rs index 843e4ee..ad8de30 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -51,12 +51,12 @@ impl Actor { instance.to_string(), }), icon: Some(activitypub::Media { - media_type: "Image".to_string(), - content_type: "image/jpeg".to_string(), + media_type: Some("Image".to_string()), + content_type: Some("image/jpeg".to_string()), url: "https://fedi.buzz/assets/favicon48.png".to_string(), }), inbox: self.uri(), - outbox: format!("{}/outbox", self.uri()), + outbox: Some(format!("{}/outbox", self.uri())), public_key: activitypub::ActorPublicKey { id: self.key_id(), owner: Some(self.uri()),