0
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-30 07:15:43 +00:00

fix http timeout

This commit is contained in:
mruac 2025-08-10 02:25:08 +09:30
parent 37174f01e5
commit 80092be651

View File

@ -596,14 +596,20 @@ class BlueskyBridge extends BridgeAbstract
private function resolveHandle($handle)
{
$uri = 'https://public.api.bsky.app/xrpc/com.atproto.identity.resolveHandle?handle=' . urlencode($handle);
$response = json_decode(getContents($uri), true);
$response = $this->loadCacheValue($uri) ?? json_decode(getContents($uri), true);
if (isset($response['did'])) {
$this->saveCacheValue($uri, $response);
}
return $response['did'];
}
private function getProfile($did)
{
$uri = 'https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=' . urlencode($did);
$response = json_decode(getContents($uri), true);
$response = $this->loadCacheValue($uri) ?? json_decode(getContents($uri), true);
if (isset($response['did'] )) {
$this->saveCacheValue($uri, $response);
}
return $response;
}