From be1cbede557e6f942f1876e89b2e17f3656f768f Mon Sep 17 00:00:00 2001 From: phil Date: Thu, 7 Aug 2025 12:20:32 -0400 Subject: [PATCH] appview: repo: trim leading @ from collaborator's handle The "add collaborator" form currently fails if you submit a handle like `@example.com`, since the identity gets forwarded eventually directly to Bluesky's identity parse, which does not accept the `@` prefix for handles. This change is targetted to only fix that one form. Signed-off-by: phil --- appview/repo/repo.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appview/repo/repo.go b/appview/repo/repo.go index 7aa72b7..9e9433d 100644 --- a/appview/repo/repo.go +++ b/appview/repo/repo.go @@ -742,6 +742,9 @@ func (rp *Repo) AddCollaborator(w http.ResponseWriter, r *http.Request) { return } + // remove a single leading `@`, to make @handle work with ResolveIdent + collaborator = strings.TrimPrefix(collaborator, "@") + collaboratorIdent, err := rp.idResolver.ResolveIdent(r.Context(), collaborator) if err != nil { fail(fmt.Sprintf("'%s' is not a valid DID/handle.", collaborator), err) -- 2.43.0