aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/ActivityStreams.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-02-18 18:16:50 -0800
committerzotlabs <mike@macgirvin.com>2019-02-18 18:16:50 -0800
commit175f78fa844ca196a02a441c9270c5b1e34c6c27 (patch)
tree621e3bf477d1d358b8a21a5e5a6f692f593b4f48 /Zotlabs/Lib/ActivityStreams.php
parentb5109d2a1ae6056ec845c66ad89ccb02b4de0a05 (diff)
downloadvolse-hubzilla-175f78fa844ca196a02a441c9270c5b1e34c6c27.tar.gz
volse-hubzilla-175f78fa844ca196a02a441c9270c5b1e34c6c27.tar.bz2
volse-hubzilla-175f78fa844ca196a02a441c9270c5b1e34c6c27.zip
support zot location independent urls
Diffstat (limited to 'Zotlabs/Lib/ActivityStreams.php')
-rw-r--r--Zotlabs/Lib/ActivityStreams.php20
1 files changed, 2 insertions, 18 deletions
diff --git a/Zotlabs/Lib/ActivityStreams.php b/Zotlabs/Lib/ActivityStreams.php
index 49978031e..a357b6d69 100644
--- a/Zotlabs/Lib/ActivityStreams.php
+++ b/Zotlabs/Lib/ActivityStreams.php
@@ -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) {