ai/at
1
0
Files
at/patching/210-bgs-since-empty-fix.patch
2026-01-16 10:10:22 +09:00

27 lines
819 B
Diff

diff --git a/indexer/indexer.go b/indexer/indexer.go
index e3c28ec1..66663de0 100644
--- a/indexer/indexer.go
+++ b/indexer/indexer.go
@@ -104,13 +104,20 @@ func (ix *Indexer) HandleRepoEvent(ctx context.Context, evt *repomgr.RepoEvent)
toobig = true
}
+ // Normalize empty string to nil for since field
+ // Empty string fails TID validation on consumers
+ var since *string
+ if evt.Since != nil && *evt.Since != "" {
+ since = evt.Since
+ }
+
ix.log.Debug("Sending event", "did", did)
if err := ix.events.AddEvent(ctx, &events.XRPCStreamEvent{
RepoCommit: &comatproto.SyncSubscribeRepos_Commit{
Repo: did,
Blocks: slice,
Rev: evt.Rev,
- Since: evt.Since,
+ Since: since,
Commit: lexutil.LexLink(evt.NewRoot),
Time: time.Now().Format(util.ISO8601),
Ops: outops,