aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Follow.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Follow.php')
-rw-r--r--Zotlabs/Module/Follow.php23
1 files changed, 3 insertions, 20 deletions
diff --git a/Zotlabs/Module/Follow.php b/Zotlabs/Module/Follow.php
index f8bfc11f3..55ff507c8 100644
--- a/Zotlabs/Module/Follow.php
+++ b/Zotlabs/Module/Follow.php
@@ -7,7 +7,6 @@ use Zotlabs\Lib\Libsync;
use Zotlabs\Lib\ActivityStreams;
use Zotlabs\Lib\Activity;
use Zotlabs\Web\HTTPSig;
-use Zotlabs\Lib\LDSignatures;
use Zotlabs\Lib\Connect;
use Zotlabs\Daemon\Master;
@@ -39,30 +38,14 @@ class Follow extends Controller {
http_status_exit(404, 'Not found');
}
- $x = array_merge(['@context' => [
- ACTIVITYSTREAMS_JSONLD_REV,
- 'https://w3id.org/security/v1',
- z_root() . ZOT_APSCHEMA_REV
- ]],
- [
+ $obj = [
'id' => z_root() . '/follow/' . $r[0]['abook_id'],
'type' => 'Follow',
'actor' => $actor,
'object' => $r[0]['xchan_url']
- ]);
-
- $headers = [];
- $headers['Content-Type'] = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' ;
- $x['signature'] = LDSignatures::sign($x,$chan);
- $ret = json_encode($x, JSON_UNESCAPED_SLASHES);
- $headers['Date'] = datetime_convert('UTC','UTC', 'now', 'D, d M Y H:i:s \\G\\M\\T');
- $headers['Digest'] = HTTPSig::generate_digest_header($ret);
- $headers['(request-target)'] = strtolower($_SERVER['REQUEST_METHOD']) . ' ' . $_SERVER['REQUEST_URI'];
- $h = HTTPSig::create_sig($headers,$chan['channel_prvkey'],channel_url($chan));
- HTTPSig::set_headers($h);
- echo $ret;
- killme();
+ ];
+ as_return_and_die($obj, $chan);
}
if (! local_channel()) {