Skip to content

Comments

Add reply field to Post struct#10

Merged
cyypherus merged 3 commits intocyypherus:mainfrom
doceazedo:add-reply-support
Feb 5, 2026
Merged

Add reply field to Post struct#10
cyypherus merged 3 commits intocyypherus:mainfrom
doceazedo:add-reply-support

Conversation

@doceazedo
Copy link
Contributor

hello! i added the reply field from posts to allow feed generators to filter out replies (or handle them differently). the ReplyRef matches the structure in the atproto post record :-)

@cyypherus
Copy link
Owner

Thank you for the PR!

I see that the model for post references in atrium also contains cid. I'm wondering if there should be something like a universal "post reference" model in skyfeed.

// From atrium api
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct MainData {
    pub cid: crate::types::string::Cid,
    pub uri: String,
}

We already have a post reference sort of model for quoted posts which could use the same type.

#[derive(Debug, Clone)]
pub struct QuoteEmbed {
    pub cid: Cid,
    pub uri: String,
}

What are your thoughts? Is there a chance you'd need the cid? Just considering our options 🤗

@doceazedo
Copy link
Contributor Author

well, for my use case I only actually need post.reply.is_some()... but since this is a library, others might want to build thread views or fetch the parent post for context... so i would say that ReplyRef is reasonable as it "mirrors" atrium's ReplyRefData.

maybe if someone else needs the CID they can implement some PostRef? :p

@cyypherus cyypherus merged commit 8d0fcca into cyypherus:main Feb 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants