Write on the margins of the internet. Powered by the AT Protocol.
0
fork

Configure Feed

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

use slingshot as default for resolvehandle

scanash00 ae1828a5 9a4df148

+6
+6
backend/internal/oauth/client.go
··· 19 19 "github.com/go-jose/go-jose/v4" 20 20 "github.com/go-jose/go-jose/v4/jwt" 21 21 "margin.at/internal/config" 22 + "margin.at/internal/slingshot" 22 23 ) 23 24 24 25 type Client struct { ··· 87 88 } 88 89 89 90 func (c *Client) ResolveHandle(ctx context.Context, handle string) (string, error) { 91 + slingshotClient := slingshot.NewClient() 92 + if identity, err := slingshotClient.ResolveIdentity(ctx, handle); err == nil && identity.DID != "" { 93 + return identity.DID, nil 94 + } 95 + 90 96 did, err := c.resolveHandleAt(ctx, handle, config.Get().BskyPublicAPI) 91 97 if err == nil { 92 98 return did, nil