-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix handle resolution in some cli commands #631
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to get this stuff over to the identity package! happy to help with any tweaks to that package if needed, and doing other similar code changes
@@ -78,7 +82,7 @@ var checkUserCmd = &cli.Command{ | |||
|
|||
adminKey := cctx.String("admin-password") | |||
xrpcc.AdminToken = &adminKey | |||
xrpcc.Host = id.PDSEndpoint() | |||
xrpcc.Host = cctx.String("admin-endpoint") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense. at some point we should probably have a better name than "admin" but i'm not sure what that should be right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i always lean towards more verbose when i'm unsure here
Host: "https://api.bsky.app", | ||
Host: "https://mod.bsky.app", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to have this be a config (env var) as well, but not a blocking issue
phr := &api.ProdHandleResolver{} | ||
resp, err := phr.ResolveHandleToDid(ctx, did) | ||
dir := identity.DefaultDirectory() | ||
resp, err := dir.LookupHandle(ctx, syntax.Handle(did)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feeling happy that these re-writes are basically one-to-one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, the only weird bit is i'm not using the parse handle code and am just casting direct to the handle type. Feels like unnecessary overhead to me
probably more of this to come, the ProdHandleResolver type is basically broken now