support zot location independent urls
This commit is contained in:
@@ -263,24 +263,8 @@ class ActivityStreams {
|
||||
return self::fetch($url);
|
||||
}
|
||||
|
||||
static function fetch($url) {
|
||||
$redirects = 0;
|
||||
if(! check_siteallowed($url)) {
|
||||
logger('blacklisted: ' . $url);
|
||||
return null;
|
||||
}
|
||||
logger('fetch: ' . $url, LOGGER_DEBUG);
|
||||
$x = z_fetch_url($url, true, $redirects,
|
||||
[ 'headers' => [ 'Accept: application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"' ]]);
|
||||
if($x['success']) {
|
||||
$y = json_decode($x['body'],true);
|
||||
logger('returned: ' . json_encode($y,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES));
|
||||
return json_decode($x['body'], true);
|
||||
}
|
||||
else {
|
||||
logger('fetch failed: ' . $url);
|
||||
}
|
||||
return null;
|
||||
static function fetch($url,$channel = null) {
|
||||
return Activity::fetch($url,$channel);
|
||||
}
|
||||
|
||||
static function is_an_actor($s) {
|
||||
|
Reference in New Issue
Block a user