this repo has no description
0
fork

Configure Feed

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

automod: fix tests (no XRPC in testing)

+15 -10
+10
automod/account_meta.go
··· 38 38 // wipe parsed public key; it's a waste of space and can't serialize 39 39 ident.ParsedPublicKey = nil 40 40 41 + // fallback in case client wasn't configured (eg, testing) 42 + if e.BskyClient == nil { 43 + e.Logger.Warn("skipping account meta hydration") 44 + am := AccountMeta{ 45 + Identity: ident, 46 + Profile: ProfileSummary{}, 47 + } 48 + return &am, nil 49 + } 50 + 41 51 existing, err := e.Cache.Get(ctx, "acct", ident.DID.String()) 42 52 if err != nil { 43 53 return nil, err
+5 -10
automod/engine_test.go
··· 8 8 appbsky "github.com/bluesky-social/indigo/api/bsky" 9 9 "github.com/bluesky-social/indigo/atproto/identity" 10 10 "github.com/bluesky-social/indigo/atproto/syntax" 11 - "github.com/bluesky-social/indigo/xrpc" 12 11 13 12 "github.com/stretchr/testify/assert" 14 13 ) ··· 49 48 Handle: syntax.Handle("handle.example.com"), 50 49 } 51 50 dir.Insert(id1) 52 - adminc := xrpc.Client{ 53 - Host: "http://dummy.local", 54 - } 55 51 engine := Engine{ 56 - Logger: slog.Default(), 57 - Directory: &dir, 58 - Counters: NewMemCountStore(), 59 - Sets: sets, 60 - Rules: rules, 61 - AdminClient: &adminc, 52 + Logger: slog.Default(), 53 + Directory: &dir, 54 + Counters: NewMemCountStore(), 55 + Sets: sets, 56 + Rules: rules, 62 57 } 63 58 return engine 64 59 }