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:
parent
37174f01e5
commit
80092be651
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user