From 4221985b90379a40e65b0c1f3a72975883ba3bb6 Mon Sep 17 00:00:00 2001 From: Evan Jarrett Date: Tue, 14 Oct 2025 21:08:49 -0500 Subject: [PATCH] show availableUserDomains --- pkg/hold/pds/xrpc.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkg/hold/pds/xrpc.go b/pkg/hold/pds/xrpc.go index c52fdcc..13a6613 100644 --- a/pkg/hold/pds/xrpc.go +++ b/pkg/hold/pds/xrpc.go @@ -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 }