From 28c30cc5024330bf7542d99820558ad68971a96c Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 14 Nov 2023 08:20:44 -0500 Subject: [PATCH] Adding skip_serializing_none to federation state. (#4152) --- crates/api_common/src/site.rs | 2 ++ crates/db_schema/src/source/federation_queue_state.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/crates/api_common/src/site.rs b/crates/api_common/src/site.rs index c13b96f30..2d83a12a4 100644 --- a/crates/api_common/src/site.rs +++ b/crates/api_common/src/site.rs @@ -328,6 +328,7 @@ pub struct FederatedInstances { pub blocked: Vec, } +#[skip_serializing_none] #[derive(Debug, Serialize, Deserialize, Clone)] #[cfg_attr(feature = "full", derive(TS))] #[cfg_attr(feature = "full", ts(export))] @@ -350,6 +351,7 @@ impl From for ReadableFederationState { } } +#[skip_serializing_none] #[derive(Debug, Serialize, Deserialize, Clone)] #[cfg_attr(feature = "full", derive(TS))] #[cfg_attr(feature = "full", ts(export))] diff --git a/crates/db_schema/src/source/federation_queue_state.rs b/crates/db_schema/src/source/federation_queue_state.rs index 31bee8819..134dfe452 100644 --- a/crates/db_schema/src/source/federation_queue_state.rs +++ b/crates/db_schema/src/source/federation_queue_state.rs @@ -3,9 +3,11 @@ use chrono::{DateTime, Utc}; #[cfg(feature = "full")] use diesel::prelude::*; use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; #[cfg(feature = "full")] use ts_rs::TS; +#[skip_serializing_none] #[derive(Clone, Debug, Serialize, Deserialize)] #[cfg_attr( feature = "full",