···3838 h := &handler{
3939 seenSeqs: make(map[int64]struct{}),
4040 feedGenerator: feedGen,
4141- parentsToLookFor: make(map[string]struct{}),
4141+ parentsToLookFor: make(map[string]map[string]struct{}),
4242 }
43434444 scheduler := sequential.NewScheduler("jetstream_localdev", logger, h.HandleEvent)
···8585 return nil
8686 }
87878888+ parentURI := post.Reply.Parent.Uri
8989+8890 // look for posts where I've "subsribed" so that we can add the parent URI to a list of replies to that parent to look for
8991 if strings.Contains(post.Text, "/subscribe") && event.Did == "did:plc:dadhhalkfcq3gucaq25hjqon" {
9090- slog.Info("a post that's subscribing to a parent. Adding to parents to look for", "parent URI", post.Reply.Parent.Uri)
9191- // h.parentsToLookFor[post.Reply.Parent.Uri] = struct{}{}
9292- h.addDidToSubscribedParent(post.Reply.Parent.Uri, event.Did)
9292+ slog.Info("a post that's subscribing to a parent. Adding to parents to look for", "parent URI", parentURI)
9393+ h.addDidToSubscribedParent(parentURI, event.Did)
9394 return nil
9495 }
95969697 // see if the post is a reply to a post we are subscribed to
9797- subscribedDids := h.getSubscribedDidsForParent(post.Reply.Parent.Uri)
9898+ subscribedDids := h.getSubscribedDidsForParent(parentURI)
9899 if len(subscribedDids) == 0 {
99100 return nil
100101 }
101102102102- slog.Info("post is a reply to a parent that users are subscribed to", "parent URI", post.Reply.Parent.Uri, "dids", subscribedDids, "RKey", event.Commit.RKey)
103103+ slog.Info("post is a reply to a parent that users are subscribed to", "parent URI", parentURI, "dids", subscribedDids, "RKey", event.Commit.RKey)
103104104105 h.feedGenerator.AddToFeedPosts(subscribedDids, fmt.Sprintf("at://%s/app.bsky.feed.post/%s", event.Did, event.Commit.RKey))
105106 }