fork of indigo with slightly nicer lexgen

implement identity cached key removal elsewhere

Changed files
+3 -15
atproto
identity
automod
-5
atproto/identity/redisdir/redis_directory.go
··· 112 112 return &he, nil 113 113 } 114 114 115 - ident.ParsedPublicKey = nil 116 115 entry := identityEntry{ 117 116 Updated: time.Now(), 118 117 Identity: ident, ··· 195 194 196 195 func (d *RedisDirectory) updateDID(ctx context.Context, did syntax.DID) (*identityEntry, error) { 197 196 ident, err := d.Inner.LookupDID(ctx, did) 198 - // wipe parsed public key; it's a waste of space and can't serialize 199 - if nil == err { 200 - ident.ParsedPublicKey = nil 201 - } 202 197 // persist the identity lookup error, instead of processing it immediately 203 198 entry := identityEntry{ 204 199 Updated: time.Now(),
-2
automod/capture/capture.go
··· 26 26 } 27 27 } 28 28 29 - // clear any pre-parsed key, which would fail to marshal as JSON 30 - ident.ParsedPublicKey = nil 31 29 am, err := eng.GetAccountMeta(ctx, ident) 32 30 if err != nil { 33 31 return nil, err
+1 -2
automod/capture/testdata/capture_atprotocom.json
··· 18 18 "Type": "Multikey", 19 19 "PublicKeyMultibase": "zQ3shunBKsXixLxKtC5qeSG9E4J5RkGN57im31pcTzbNQnm5w" 20 20 } 21 - }, 22 - "ParsedPublicKey": null 21 + } 23 22 }, 24 23 "Profile": { 25 24 "HasAvatar": true,
-3
automod/engine/fetch_account_meta.go
··· 16 16 17 17 logger := e.Logger.With("did", ident.DID.String()) 18 18 19 - // wipe parsed public key; it's a waste of space and can't serialize 20 - ident.ParsedPublicKey = nil 21 - 22 19 // fallback in case client wasn't configured (eg, testing) 23 20 if e.BskyClient == nil { 24 21 logger.Warn("skipping account meta hydration")
+1 -1
automod/rules/quick.go
··· 9 9 "github.com/bluesky-social/indigo/automod" 10 10 ) 11 11 12 - var botLinkStrings = []string{"ainna13762491", "LINK押して", "→ https://tiny.one/"} 12 + var botLinkStrings = []string{"ainna13762491", "LINK押して", "→ https://tiny", "⇒ http://tiny"} 13 13 var botSpamTLDs = []string{".today", ".life"} 14 14 var botSpamStrings = []string{"515-9719"} 15 15
+1 -2
automod/rules/testdata/capture_hackerdarkweb.json
··· 18 18 "Type": "Multikey", 19 19 "PublicKeyMultibase": "zQ3sha9ULLgA6zyJmk1z2uDkpkSs4Ypou33RE8XuhwWtSHF75" 20 20 } 21 - }, 22 - "ParsedPublicKey": null 21 + } 23 22 }, 24 23 "Profile": { 25 24 "HasAvatar": true,