- $ret = Network::curl($url, false, $redirects, ['accept_content' => 'application/activity+json, application/ld+json']);
- if (!$ret['success'] || empty($ret['body'])) {
+ if (!empty($uid)) {
+ return HTTPSignature::fetch($url, 1);
+ }
+
+ $curlResult = Network::curl($url, false, $redirects, ['accept_content' => 'application/activity+json, application/ld+json']);
+ if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
+ return false;
+ }
+
+ $content = json_decode($curlResult->getBody(), true);
+
+ if (empty($content) || !is_array($content)) {