this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

try and get createdAt from post

+8 -2
+8 -2
handler.go
··· 87 87 slog.Info("post is a reply to a post that users are subscribed to", "subscribed post URI", subscribedPostURI, "dids", subscribedDids, "RKey", event.Commit.RKey) 88 88 89 89 // TODO: parse from the event 90 - createdAt := time.Now().UTC().UnixMilli() 90 + createdAt, err := time.Parse(time.RFC1123, post.CreatedAt) 91 + if err != nil { 92 + slog.Error("parsing createdAt time from post", "error", err, "timestamp", post.CreatedAt) 93 + createdAt = time.Now().UTC() 94 + } 95 + 96 + slog.Info("created at", "time stamp", createdAt, "original time stamp", post.CreatedAt) 91 97 92 98 replyPostURI := fmt.Sprintf("at://%s/app.bsky.feed.post/%s", event.Did, event.Commit.RKey) 93 - h.createFeedPostForSubscribedUsers(subscribedDids, replyPostURI, subscribedPostURI, createdAt) 99 + h.createFeedPostForSubscribedUsers(subscribedDids, replyPostURI, subscribedPostURI, createdAt.UnixMilli()) 94 100 return nil 95 101 } 96 102