diff --git a/install.zsh b/install.zsh index 4244328..ba1c332 100755 --- a/install.zsh +++ b/install.zsh @@ -78,6 +78,7 @@ PATCH_FILES=( "152-indigo-newpds-dayper-limit-pr707.diff" "190-bgs-disable-ratelimit.patch" "200-feed-generator-custom.patch" + "210-bgs-since-empty-fix.patch" ) function at-repos-clone() { diff --git a/patching/210-bgs-since-empty-fix.patch b/patching/210-bgs-since-empty-fix.patch new file mode 100644 index 0000000..501ba01 --- /dev/null +++ b/patching/210-bgs-since-empty-fix.patch @@ -0,0 +1,26 @@ +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,