A community based topic aggregation platform built on atproto

fix(community): populate viewer state on community.get for authed callers master

The social.coves.community.get lexicon promises viewer state when the caller is authenticated, but the endpoint never delivered it: the route was registered without OptionalAuth middleware (so the caller's DID was never resolved) and the handler never invoked the viewer-state helper. Subscribing to a community then reloading its page reverted the button to "Subscribe", making it impossible to unsubscribe from the community page. community.list already did this correctly; this copies its exact pattern. Changes: - Add OptionalAuth middleware to the community.get route so the authenticated caller's DID reaches the handler - Pass the communities repository into GetHandler and populate viewer.subscribed via common.PopulateCommunityViewerState before serializing (ToCommunityViewDetailed already carried the field) - Add integration test covering subscribed=true, subscribed=false, and viewer omitted for unauthenticated requests Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>


+161 -3
3 changed files