this repo has no description
0
fork

Configure Feed

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

add basic command to verify a user

+41
+41
cmd/gosky/main.go
··· 104 104 readRepoStreamCmd, 105 105 parseRkey, 106 106 listLabelsCmd, 107 + verifyUserCmd, 107 108 } 108 109 109 110 app.RunAndExitOnError() ··· 814 815 return nil 815 816 }, 816 817 } 818 + 819 + var verifyUserCmd = &cli.Command{ 820 + Name: "verify-user", 821 + Usage: "create a feed generator record", 822 + Flags: []cli.Flag{}, 823 + Action: func(cctx *cli.Context) error { 824 + xrpcc, err := cliutil.GetXrpcClient(cctx, true) 825 + if err != nil { 826 + return err 827 + } 828 + 829 + ctx := context.TODO() 830 + handle := cctx.Args().First() 831 + 832 + ident, err := identity.DefaultDirectory().LookupHandle(ctx, syntax.Handle(handle)) 833 + if err != nil { 834 + return err 835 + } 836 + 837 + rec := &lexutil.LexiconTypeDecoder{Val: &bsky.GraphVerification{ 838 + CreatedAt: time.Now().Format(util.ISO8601), 839 + DisplayName: "", 840 + Handle: handle, 841 + Subject: ident.DID.String(), 842 + }} 843 + 844 + resp, err := atproto.RepoCreateRecord(ctx, xrpcc, &atproto.RepoCreateRecord_Input{ 845 + Collection: "app.bsky.graph.verification", 846 + Repo: xrpcc.Auth.Did, 847 + Record: rec, 848 + }) 849 + if err != nil { 850 + return err 851 + } 852 + 853 + fmt.Println(resp.Uri) 854 + 855 + return nil 856 + }, 857 + }