this repo has no description
0
fork

Configure Feed

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

look for /subscribe with strings.contains()

+3 -2
+3 -2
consumer.go
··· 6 6 "fmt" 7 7 "log" 8 8 "log/slog" 9 + "strings" 9 10 "sync" 10 11 "time" 11 12 ··· 90 91 defer h.mu.Unlock() 91 92 92 93 // 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 93 - if post.Text == "/subscribe" && event.Did == "did:plc:dadhhalkfcq3gucaq25hjqon" { 94 - slog.Info("it's a reply with a parent! Adding to parents to look for", "parent URI", post.Reply.Parent.Uri) 94 + if strings.Contains(post.Text, "/subscribe") && event.Did == "did:plc:dadhhalkfcq3gucaq25hjqon" { 95 + slog.Info("a post that's subscribing to a parent. Adding to parents to look for", "parent URI", post.Reply.Parent.Uri) 95 96 h.parentsToLookFor[post.Reply.Parent.Uri] = struct{}{} 96 97 return nil 97 98 }