From 3ade8375799ab2bd57177ed95fbabf8b8b162c9a Mon Sep 17 00:00:00 2001 From: Jedrzej Stuczynski Date: Fri, 13 Mar 2020 16:46:04 +0000 Subject: [PATCH] Added location to CocoPresence --- common/clients/directory-client/src/presence/coconodes.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/clients/directory-client/src/presence/coconodes.rs b/common/clients/directory-client/src/presence/coconodes.rs index e2b61f0771..60ee21f6d9 100644 --- a/common/clients/directory-client/src/presence/coconodes.rs +++ b/common/clients/directory-client/src/presence/coconodes.rs @@ -4,6 +4,7 @@ use topology::coco; #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct CocoPresence { + pub location: String, pub host: String, pub pub_key: String, pub last_seen: u64, @@ -13,6 +14,7 @@ pub struct CocoPresence { impl Into for CocoPresence { fn into(self) -> topology::coco::Node { topology::coco::Node { + location: self.location, host: self.host, pub_key: self.pub_key, last_seen: self.last_seen, @@ -24,6 +26,7 @@ impl Into for CocoPresence { impl From for CocoPresence { fn from(cn: coco::Node) -> Self { CocoPresence { + location: cn.location, host: cn.host, pub_key: cn.pub_key, last_seen: cn.last_seen,