Use original publication date for post createdAt

Posts now use the item pub_date for the createdAt field instead
of the current time, so posts show their original publication time.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
primal
2026-01-28 21:29:44 -05:00
parent a1f02cd0bc
commit bce6c93242
+4 -5
View File
@@ -346,12 +346,11 @@ func (p *Publisher) PublishItem(session *PDSSession, item *Item) (string, error)
}
text := textBuilder.String()
// Use current time for createdAt (Bluesky won't index backdated posts)
// TODO: Restore original pubDate once Bluesky indexing is understood
// Use original publication date if available, otherwise current time
createdAt := time.Now()
// if !item.PubDate.IsZero() {
// createdAt = item.PubDate
// }
if !item.PubDate.IsZero() {
createdAt = item.PubDate
}
post := BskyPost{
Type: "app.bsky.feed.post",