Skip to content

Commit

Permalink
com.atproto.account.createInviteCode has been renamed to com.atproto.…
Browse files Browse the repository at this point in the history
…server.createInviteCode
  • Loading branch information
nazo committed Apr 25, 2024
1 parent c216f68 commit 36e942e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xrpc/xrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (c *Client) Do(ctx context.Context, kind XRPCRequestType, inpenc string, me
}

// use admin auth if we have it configured and are doing a request that requires it
if c.AdminToken != nil && (strings.HasPrefix(method, "com.atproto.admin.") || strings.HasPrefix(method, "tools.ozone.") || method == "com.atproto.account.createInviteCode" || method == "com.atproto.server.createInviteCodes") {
if c.AdminToken != nil && (strings.HasPrefix(method, "com.atproto.admin.") || strings.HasPrefix(method, "tools.ozone.") || method == "com.atproto.server.createInviteCode" || method == "com.atproto.server.createInviteCodes") {
req.Header.Set("Authorization", "Basic "+base64.StdEncoding.EncodeToString([]byte("admin:"+*c.AdminToken)))
} else if c.Auth != nil {
req.Header.Set("Authorization", "Bearer "+c.Auth.AccessJwt)
Expand Down

0 comments on commit 36e942e

Please sign in to comment.