audio streaming app plyr.fm

fix: show Bluesky avatars for supporters not in plyr.fm database (#943)

supporters who have Bluesky accounts but haven't used plyr.fm showed
only their initial letter because /artists/batch only returns DIDs in
our DB. now falls back to constructing a CDN URL from the atprotofans
API's avatar blob data (did + CID).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

authored by zzstoatzz.io

Claude Opus 4.6 and committed by
GitHub
f324d026 fea22f2e

+12 -2
+12 -2
frontend/src/lib/atprotofans.ts
··· 85 85 if (artistsResponse.ok) { 86 86 const artistsMap = await artistsResponse.json(); 87 87 data.supporters = data.supporters.map( 88 - (s: { did: string; handle: string; displayName?: string }) => { 88 + (s: { 89 + did: string; 90 + handle: string; 91 + displayName?: string; 92 + avatar?: { ref?: { $link?: string } }; 93 + }) => { 89 94 const artist = artistsMap[s.did]; 95 + const blobCid = s.avatar?.ref?.['$link']; 90 96 return { 91 97 did: s.did, 92 98 handle: artist?.handle || s.handle, 93 99 display_name: artist?.display_name || s.displayName || s.handle, 94 - avatar_url: artist?.avatar_url 100 + avatar_url: 101 + artist?.avatar_url || 102 + (blobCid 103 + ? `https://cdn.bsky.app/img/avatar/plain/${s.did}/${blobCid}@jpeg` 104 + : undefined) 95 105 }; 96 106 } 97 107 );