show availableUserDomains

This commit is contained in:
Evan Jarrett
2025-10-14 21:08:49 -05:00
parent d726e464a6
commit 4221985b90
+10 -1
View File
@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"net/http"
"strings"
)
// XRPC handler for ATProto endpoints
@@ -93,9 +94,17 @@ func (h *XRPCHandler) HandleDescribeServer(w http.ResponseWriter, r *http.Reques
return
}
// Extract hostname from public URL for availableUserDomains
// For hold01.atcr.io, return [".hold01.atcr.io"] to match stream.place pattern
hostname := h.publicURL
hostname = strings.TrimPrefix(hostname, "http://")
hostname = strings.TrimPrefix(hostname, "https://")
hostname = strings.Split(hostname, "/")[0] // Remove path
hostname = strings.Split(hostname, ":")[0] // Remove port
response := map[string]interface{}{
"did": h.pds.DID(),
"availableUserDomains": []string{},
"availableUserDomains": []string{"." + hostname},
"inviteCodeRequired": true, // Single-user PDS, no account creation
}