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:
+4
-5
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user