this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix MST key validation to allow single-character rkeys (#364)

Resolves this error we see in the BGS:
```
[error] failed to perform repo crawl of "did:plc:fdmcbkpwxxi35an4kji4om2m": importing fetched repo (curRev: 3kapejih6ae2p): process new repo (current rev: 3kapejih6ae2p): cb errored root: bafyreia65iivyzibvlcewb2mh3n5rzfcx7hxnkbbaeht2buveg7hd3ov4a, rev: 3kapejih6ae2p: diff trees (curhead: bafyreia7tzyuy3cxx42xuhfc3g2cownlgpydji6gvl6ux2cgri4m7mdhdu): Not a valid MST key: app.bsky.feed.generator/A:
```

We're not matching the Typescript logic quite right, this fixes it.

authored by

Whyrusleeping and committed by
GitHub
c82dc939 5c193464

+7 -1
+6
indexer/indexer.go
··· 276 276 return nil 277 277 case *bsky.ActorProfile: 278 278 return nil 279 + case *bsky.GraphList: 280 + return nil 281 + case *bsky.GraphListitem: 282 + return nil 283 + case *bsky.FeedGenerator: 284 + return nil 279 285 default: 280 286 log.Warnf("unrecognized record type: %T", op.Record) 281 287 return nil
+1 -1
mst/mst_util.go
··· 226 226 return false 227 227 } 228 228 a, b, _ := strings.Cut(s, "/") 229 - return len(b) > 1 && 229 + return len(b) > 0 && 230 230 keyHasAllValidChars(a) && 231 231 keyHasAllValidChars(b) 232 232 }