backend for xcvr appview
2
fork

Configure Feed

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

find and swap profile

rachel-mp4 96f89e10 ac4edf72

+7
+7
server/internal/oauth/xrpcclient.go
··· 5 5 "errors" 6 6 "github.com/bluesky-social/indigo/api/atproto" 7 7 "github.com/bluesky-social/indigo/api/bsky" 8 + "github.com/bluesky-social/indigo/atproto/client" 8 9 "github.com/bluesky-social/indigo/atproto/syntax" 9 10 "github.com/bluesky-social/indigo/lex/util" 10 11 "github.com/haileyok/atproto-oauth-golang" ··· 95 96 if err != nil { 96 97 return errors.New("failed to get oauthsessionauthargs while making post: " + err.Error()) 97 98 } 99 + cli := client.NewAPIClient(authargs.PdsUrl) 100 + getOut, err := atproto.RepoGetRecord(ctx, cli, "", "orx.xcvr.actor.profile", authargs.Did, "self") 101 + if getOut.Cid == nil { 102 + return c.CreateXCVRProfile(profile, s, ctx) 103 + } 98 104 rkey := "self" 99 105 input := atproto.RepoPutRecord_Input{ 100 106 Collection: "org.xcvr.actor.profile", 101 107 Repo: authargs.Did, 102 108 Rkey: rkey, 103 109 Record: &util.LexiconTypeDecoder{Val: &profile}, 110 + SwapRecord: getOut.Cid, 104 111 } 105 112 var out atproto.RepoPutRecord_Output 106 113 err = c.xrpccli.Do(ctx, authargs, "POST", "application/json", "com.atproto.repo.putRecord", nil, input, &out)