diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-11-09 15:35:17 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-11-09 15:35:38 -0800 |
commit | 7af51292ddfc81d55dd5beff07c557757bb0075f (patch) | |
tree | 6601cc2c73adab784f791f650e08fd9dc92aa65b /adenosine-pds/src/models.rs | |
parent | b8eea211866766aabde8c5e55d1061deb799ddc6 (diff) | |
download | adenosine-7af51292ddfc81d55dd5beff07c557757bb0075f.tar.gz adenosine-7af51292ddfc81d55dd5beff07c557757bb0075f.zip |
pds: more bsky posts/feeds/follow/like progress
Diffstat (limited to 'adenosine-pds/src/models.rs')
-rw-r--r-- | adenosine-pds/src/models.rs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/adenosine-pds/src/models.rs b/adenosine-pds/src/models.rs index 116ac53..0f47c2d 100644 --- a/adenosine-pds/src/models.rs +++ b/adenosine-pds/src/models.rs @@ -59,7 +59,8 @@ pub struct RepoBatchWrite { #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct Subject { pub uri: String, - pub cid: String, + // TODO: CID is required + pub cid: Option<String>, } /// Generic over Re-post and Like @@ -122,7 +123,8 @@ pub struct User { #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct FeedItem { pub uri: String, - pub cid: String, + // TODO: cid is required + pub cid: Option<String>, pub author: User, pub repostedBy: Option<User>, pub record: Value, @@ -139,11 +141,19 @@ pub struct FeedItem { #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct Post { pub text: String, + pub reply: Option<PostReply>, pub createdAt: Option<String>, } #[allow(non_snake_case)] #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] +pub struct PostReply { + pub parent: Subject, + pub root: Subject, +} + +#[allow(non_snake_case)] +#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct PostThread { pub thread: ThreadItem, } @@ -152,7 +162,8 @@ pub struct PostThread { #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct ThreadItem { pub uri: String, - pub cid: String, + // TODO: CID is required + pub cid: Option<String>, pub author: User, pub record: Value, //pub embed?: RecordEmbed | ExternalEmbed | UnknownEmbed, |