From acef484b738f9174efecb506bbf702b7619e84cb Mon Sep 17 00:00:00 2001 From: "D. Scott Boggs" Date: Mon, 2 Jan 2023 06:34:09 -0500 Subject: [PATCH] Finish TODO Parse DateTime before publishing this field --- entities/src/filter.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entities/src/filter.rs b/entities/src/filter.rs index 30a62f2..0e8a28c 100644 --- a/entities/src/filter.rs +++ b/entities/src/filter.rs @@ -1,4 +1,5 @@ use serde::{Deserialize, Serialize}; +use time::{serde::iso8601, OffsetDateTime}; /// Represents a single Filter #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] @@ -6,7 +7,8 @@ pub struct Filter { id: String, phrase: String, context: Vec, - expires_at: Option, // TODO: timestamp + #[serde(with = "iso8601::option")] + expires_at: Option, irreversible: bool, whole_word: bool, }