From 24e4ad62895b6981d11dba8803cbba45fe1e74af Mon Sep 17 00:00:00 2001 From: Bretton Date: Thu, 6 Nov 2025 17:17:35 -0800 Subject: [PATCH] feat: add handle field to communityRef lexicon and struct - Update communityRef lexicon definition to include handle field - Add Handle field to CommunityRef struct - Follows atProto pattern of including both DID and handle - Consistent with authorView which requires both fields Fixes: Backend missing community handle in feed responses --- .../atproto/lexicon/social/coves/community/post/get.json | 5 +++++ internal/core/posts/post.go | 1 + 2 files changed, 6 insertions(+) diff --git a/internal/atproto/lexicon/social/coves/community/post/get.json b/internal/atproto/lexicon/social/coves/community/post/get.json index 5e0f135..e00f8e8 100644 --- a/internal/atproto/lexicon/social/coves/community/post/get.json +++ b/internal/atproto/lexicon/social/coves/community/post/get.json @@ -150,6 +150,11 @@ "type": "string", "format": "did" }, + "handle": { + "type": "string", + "format": "handle", + "description": "Current handle resolved from DID" + }, "name": { "type": "string" }, diff --git a/internal/core/posts/post.go b/internal/core/posts/post.go index ef68ca4..10f8ec8 100644 --- a/internal/core/posts/post.go +++ b/internal/core/posts/post.go @@ -119,6 +119,7 @@ type AuthorView struct { type CommunityRef struct { Avatar *string `json:"avatar,omitempty"` DID string `json:"did"` + Handle string `json:"handle"` Name string `json:"name"` } -- 2.51.2