fix patch bgs lexicon null
This commit is contained in:
@@ -78,6 +78,7 @@ PATCH_FILES=(
|
|||||||
"152-indigo-newpds-dayper-limit-pr707.diff"
|
"152-indigo-newpds-dayper-limit-pr707.diff"
|
||||||
"190-bgs-disable-ratelimit.patch"
|
"190-bgs-disable-ratelimit.patch"
|
||||||
"200-feed-generator-custom.patch"
|
"200-feed-generator-custom.patch"
|
||||||
|
"210-bgs-since-empty-fix.patch"
|
||||||
)
|
)
|
||||||
|
|
||||||
function at-repos-clone() {
|
function at-repos-clone() {
|
||||||
|
|||||||
26
patching/210-bgs-since-empty-fix.patch
Normal file
26
patching/210-bgs-since-empty-fix.patch
Normal file
@@ -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,
|
||||||
Reference in New Issue
Block a user