this repo has no description

Hopefully made it show profiles without profile

Casey cda82035 67af67ef

Changed files
+17 -9
src
+17 -9
src/lib/pdsfetch.ts
··· 133 133 did: `did:${string}:${string}`, 134 134 ) => { 135 135 // gonna assume self exists in the app.bsky.actor.profile 136 + const account: AccountMetadata = { 137 + did: did, 138 + handle: "", 139 + displayName: "", 140 + avatarCid: null, 141 + }; 142 + 136 143 try { 137 144 const { data } = await rpc.get("com.atproto.repo.getRecord", { 138 145 params: { ··· 142 149 }, 143 150 }); 144 151 const value = data.value as AppBskyActorProfile.Record; 145 - const handle = await blueskyHandleFromDid(did); 146 - const account: AccountMetadata = { 147 - did: did, 148 - handle: handle, 149 - displayName: value.displayName || "", 150 - avatarCid: null, 151 - }; 152 + account.displayName = value.displayName || ""; 152 153 if (value.avatar) { 153 154 account.avatarCid = value.avatar.ref["$link"]; 154 155 } 155 - return account; 156 + } catch (e) { 157 + console.warn(`Error fetching profile for ${did}:`, e); 158 + } 159 + 160 + try { 161 + account.handle = await blueskyHandleFromDid(did); 156 162 } catch (e) { 157 - console.error(`Error fetching metadata for ${did}:`, e); 163 + console.error(`Error fetching handle for ${did}:`, e); 158 164 return null; 159 165 } 166 + 167 + return account; 160 168 }; 161 169 162 170 const getAllMetadataFromPds = async (): Promise<AccountMetadata[]> => {