decentralized and customizable links page on top of atproto ligo.at
atproto link-in-bio python uv
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix pds resolve from doc

+5 -2
+5 -2
src/atproto/__init__.py
··· 44 44 name="raw", 45 45 ), 46 46 ), 47 + # TODO: should be first that is not None 47 48 return_when=asyncio.FIRST_COMPLETED, 48 49 ) 49 50 return done.result() ··· 184 185 """Returns the PDS endpoint from the DID document.""" 185 186 186 187 for service in doc.get("service", []): 187 - if service.get("id") == "#atproto_pds": 188 + type = service.get("type") 189 + id = service.get("id", "") 190 + if type == "AtprotoPersonalDataServer" or id.endswith("#atproto_pds"): 188 191 url = service.get("serviceEndpoint") 189 192 if url is not None: 190 193 return PdsUrl(url) ··· 204 207 doc = await resolve_doc_from_did(client, did) 205 208 if doc is None: 206 209 return None 207 - pds = doc["service"][0]["serviceEndpoint"] 210 + pds = pds_endpoint_from_doc(doc) 208 211 if pds is None: 209 212 return None 210 213 kv.set(did, value=pds)