From d0fffdc4abb91051ce0330a171392191354c4434 Mon Sep 17 00:00:00 2001 From: Darius Date: Thu, 12 Oct 2023 13:55:45 -0400 Subject: [PATCH] chore: Update root document timestamp --- extensions/warp-ipfs/src/store/document.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/warp-ipfs/src/store/document.rs b/extensions/warp-ipfs/src/store/document.rs index 663e665b3..19f98e14f 100644 --- a/extensions/warp-ipfs/src/store/document.rs +++ b/extensions/warp-ipfs/src/store/document.rs @@ -137,6 +137,11 @@ impl RootDocument { let mut root_document = self.clone(); //In case there is a signature already exist root_document.signature = None; + if root_document.created.is_none() { + root_document.created = Some(Utc::now()); + } + root_document.modified = Some(Utc::now()); + let bytes = serde_json::to_vec(&root_document)?; let signature = did.sign(&bytes); self.signature = Some(bs58::encode(signature).into_string());