this repo has no description

update to tangled.org/core library to get the replyTo field of a comment

Changed files
+20 -18
+15 -15
consumer.go
···
"github.com/bluesky-social/jetstream/pkg/client/schedulers/sequential"
"github.com/bluesky-social/jetstream/pkg/models"
"github.com/bugsnag/bugsnag-go"
-
"tangled.sh/tangled.sh/core/api/tangled"
+
"tangled.org/core/api/tangled"
)
type Issue struct {
···
createdAt = time.Now().UTC()
}
-
// TODO: if there is a reply to present, don't store the comment because replies can't be replied to so
+
// if there is a replyTo present, don't store the comment because replies can't be replied to so
// the reply comment doesn't need to be stored
-
-
err = h.store.CreateComment(Comment{
-
AuthorDID: did,
-
RKey: rkey,
-
Body: comment.Body,
-
Issue: comment.Issue,
-
CreatedAt: createdAt.UnixMilli(),
-
//ReplyTo: comment, // TODO: there should be a ReplyTo field that can be used as well once the right type is imported
-
})
-
if err != nil {
-
bugsnag.Notify(err)
-
slog.Error("create comment", "error", err, "did", did, "rkey", rkey)
-
return
+
if comment.ReplyTo == nil || *comment.ReplyTo == "" {
+
err = h.store.CreateComment(Comment{
+
AuthorDID: did,
+
RKey: rkey,
+
Body: comment.Body,
+
Issue: comment.Issue,
+
CreatedAt: createdAt.UnixMilli(),
+
})
+
if err != nil {
+
bugsnag.Notify(err)
+
slog.Error("create comment", "error", err, "did", did, "rkey", rkey)
+
return
+
}
}
// TODO: now send a notification to either the issue creator or whoever the comment was a reply to
+1 -1
go.mod
···
github.com/bugsnag/bugsnag-go v2.6.2+incompatible
github.com/glebarez/go-sqlite v1.22.0
github.com/joho/godotenv v1.5.1
-
tangled.sh/tangled.sh/core v1.8.1-alpha.0.20250828210137-07b009bd6b98
+
tangled.org/core v1.9.0-alpha.0.20250924195920-24d79d05e4d2
)
require (
+4 -2
go.sum
···
modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E=
modernc.org/sqlite v1.28.0 h1:Zx+LyDDmXczNnEQdvPuEfcFVA2ZPyaD7UCZDjef3BHQ=
modernc.org/sqlite v1.28.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0=
-
tangled.sh/tangled.sh/core v1.8.1-alpha.0.20250828210137-07b009bd6b98 h1:WovrwwBufU89zoSaStoc6+qyUTEB/LxhUCM1MqGEUwU=
-
tangled.sh/tangled.sh/core v1.8.1-alpha.0.20250828210137-07b009bd6b98/go.mod h1:zXmPB9VMsPWpJ6Y51PWnzB1fL3w69P0IhR9rTXIfGPY=
+
tangled.org/core v1.9.0-alpha.0.20250924195920-24d79d05e4d2 h1:4bcQewZPzb7WfCuUPf4MPVWb04JiTbjbShcg5ONi9co=
+
tangled.org/core v1.9.0-alpha.0.20250924195920-24d79d05e4d2/go.mod h1:tYTB3RkgkeDAOFE0qX/9tQB80fdlDPR+vz4CdTMar3Y=
+
tangled.org/core v1.9.0-alpha.0.20250924200730-b2d8a54abc3d h1:DmdCyK+BZDYitJy6TdqTwvcci2EVYgDu2+LR853nyls=
+
tangled.org/core v1.9.0-alpha.0.20250924200730-b2d8a54abc3d/go.mod h1:tYTB3RkgkeDAOFE0qX/9tQB80fdlDPR+vz4CdTMar3Y=