diff --git a/lexica/src/app_bsky/mod.rs b/lexica/src/app_bsky/mod.rs index 56527f76..ed086c79 100644 --- a/lexica/src/app_bsky/mod.rs +++ b/lexica/src/app_bsky/mod.rs @@ -9,13 +9,24 @@ pub mod labeler; pub mod richtext; pub mod unspecced; -#[derive(Clone, Default, Debug, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct RecordStats { pub reply_count: i64, pub repost_count: i64, pub like_count: i64, pub quote_count: i64, - #[serde(skip_serializing_if = "Option::is_none", default)] - pub bookmark_count: Option, + pub bookmark_count: i64, +} + +impl Default for RecordStats { + fn default() -> Self { + Self { + reply_count: 0, + repost_count: 0, + like_count: 0, + quote_count: 0, + bookmark_count: 0, + } + } } diff --git a/parakeet/src/hydration/posts/builders.rs b/parakeet/src/hydration/posts/builders.rs index ea7e08ca..76cdf3ae 100644 --- a/parakeet/src/hydration/posts/builders.rs +++ b/parakeet/src/hydration/posts/builders.rs @@ -49,7 +49,7 @@ pub(super) fn build_postview( repost_count: i64::from(stats.reposts), like_count: i64::from(stats.likes), quote_count: i64::from(stats.quotes), - bookmark_count: Some(0), // Initialize bookmark_count with 0 since we don't track it yet + bookmark_count: 0, // TODO: Track bookmarks in the future }) .unwrap_or_default();