this repo has no description
0
fork

Configure Feed

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

better get-record (#861)

authored by

Whyrusleeping and committed by
GitHub
9ea78700 7fd58873

+14 -1
+14 -1
cmd/gosky/main.go
··· 18 18 "github.com/bluesky-social/indigo/api/atproto" 19 19 comatproto "github.com/bluesky-social/indigo/api/atproto" 20 20 "github.com/bluesky-social/indigo/api/bsky" 21 + "github.com/bluesky-social/indigo/atproto/identity" 21 22 "github.com/bluesky-social/indigo/atproto/syntax" 22 23 "github.com/bluesky-social/indigo/events" 23 24 "github.com/bluesky-social/indigo/events/schedulers/sequential" ··· 462 463 return fmt.Errorf("unrecognized link") 463 464 } 464 465 466 + atid, err := syntax.ParseAtIdentifier(did) 467 + if err != nil { 468 + return err 469 + } 470 + 471 + resp, err := identity.DefaultDirectory().Lookup(ctx, *atid) 472 + if err != nil { 473 + return err 474 + } 475 + 476 + xrpcc.Host = resp.PDSEndpoint() 477 + 465 478 out, err := comatproto.RepoGetRecord(ctx, xrpcc, "", collection, did, rkey) 466 479 if err != nil { 467 480 return err ··· 490 503 491 504 rc, rec, err := rr.GetRecord(ctx, cctx.Args().First()) 492 505 if err != nil { 493 - return err 506 + return fmt.Errorf("get record failed: %w", err) 494 507 } 495 508 496 509 if cctx.Bool("raw") {