about summary refs log tree commit diff
path: root/kittybox-rs/indieauth
diff options
context:
space:
mode:
Diffstat (limited to 'kittybox-rs/indieauth')
-rw-r--r--kittybox-rs/indieauth/src/lib.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/kittybox-rs/indieauth/src/lib.rs b/kittybox-rs/indieauth/src/lib.rs
index 1f84270..745ee1e 100644
--- a/kittybox-rs/indieauth/src/lib.rs
+++ b/kittybox-rs/indieauth/src/lib.rs
@@ -208,11 +208,14 @@ impl axum_core::response::IntoResponse for Metadata {
 #[derive(Clone, Debug, Serialize, Deserialize)]
 pub struct Profile {
     /// User's chosen name.
-    pub name: String,
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub name: Option<String>,
     /// User's profile page. Fetching it may reveal an `h-card`.
-    pub url: Url,
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub url: Option<Url>,
     /// User's profile picture suitable to represent them.
-    pub photo: Url,
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub photo: Option<Url>,
     /// User's email, if they've chosen to reveal it. This is guarded
     /// by the `email` scope.
     #[serde(skip_serializing_if = "Option::is_none")]