···1212 "github.com/bluesky-social/jetstream/pkg/client/schedulers/sequential"
1313 "github.com/bluesky-social/jetstream/pkg/models"
1414 "github.com/bugsnag/bugsnag-go"
1515- "tangled.sh/tangled.sh/core/api/tangled"
1515+ "tangled.org/core/api/tangled"
1616)
17171818type Issue struct {
···199199 createdAt = time.Now().UTC()
200200 }
201201202202- // TODO: if there is a reply to present, don't store the comment because replies can't be replied to so
202202+ // if there is a replyTo present, don't store the comment because replies can't be replied to so
203203 // the reply comment doesn't need to be stored
204204-205205- err = h.store.CreateComment(Comment{
206206- AuthorDID: did,
207207- RKey: rkey,
208208- Body: comment.Body,
209209- Issue: comment.Issue,
210210- CreatedAt: createdAt.UnixMilli(),
211211- //ReplyTo: comment, // TODO: there should be a ReplyTo field that can be used as well once the right type is imported
212212- })
213213- if err != nil {
214214- bugsnag.Notify(err)
215215- slog.Error("create comment", "error", err, "did", did, "rkey", rkey)
216216- return
204204+ if comment.ReplyTo == nil || *comment.ReplyTo == "" {
205205+ err = h.store.CreateComment(Comment{
206206+ AuthorDID: did,
207207+ RKey: rkey,
208208+ Body: comment.Body,
209209+ Issue: comment.Issue,
210210+ CreatedAt: createdAt.UnixMilli(),
211211+ })
212212+ if err != nil {
213213+ bugsnag.Notify(err)
214214+ slog.Error("create comment", "error", err, "did", did, "rkey", rkey)
215215+ return
216216+ }
217217 }
218218219219 // TODO: now send a notification to either the issue creator or whoever the comment was a reply to