diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-07-18 13:13:23 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-07-18 13:13:23 +0100 |
| commit | 135697a06b5c8c6c6253e39d08afab0a87bace0e (patch) | |
| tree | ffbf349502a39e52d03a73e85236216b28325fa3 /src/config.rs | |
| parent | 1c0cd657f6122d1ed406aa77e7a71df61dc38979 (diff) | |
fix(fetch): report profile updates as updates
rather than as new profiles
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs index 56619b8..f5dba98 100644 --- a/src/config.rs +++ b/src/config.rs | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | use anyhow::{anyhow, Result}; | 1 | use anyhow::{anyhow, Result}; |
| 2 | use directories::ProjectDirs; | 2 | use directories::ProjectDirs; |
| 3 | use nostr::PublicKey; | 3 | use nostr::PublicKey; |
| 4 | use nostr_sdk::Timestamp; | ||
| 4 | use serde::{self, Deserialize, Serialize}; | 5 | use serde::{self, Deserialize, Serialize}; |
| 5 | 6 | ||
| 6 | pub fn get_dirs() -> Result<ProjectDirs> { | 7 | pub fn get_dirs() -> Result<ProjectDirs> { |
| @@ -19,13 +20,13 @@ pub struct UserRef { | |||
| 19 | #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] | 20 | #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] |
| 20 | pub struct UserMetadata { | 21 | pub struct UserMetadata { |
| 21 | pub name: String, | 22 | pub name: String, |
| 22 | pub created_at: u64, | 23 | pub created_at: Timestamp, |
| 23 | } | 24 | } |
| 24 | 25 | ||
| 25 | #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] | 26 | #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] |
| 26 | pub struct UserRelays { | 27 | pub struct UserRelays { |
| 27 | pub relays: Vec<UserRelayRef>, | 28 | pub relays: Vec<UserRelayRef>, |
| 28 | pub created_at: u64, | 29 | pub created_at: Timestamp, |
| 29 | } | 30 | } |
| 30 | 31 | ||
| 31 | impl UserRelays { | 32 | impl UserRelays { |