aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Follow.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-12 10:07:15 +0000
committerMario <mario@mariovavti.com>2021-03-12 10:07:15 +0000
commit3f053611bdbbd4a26a5d9c76a294b7ada07f0726 (patch)
treeb8b16b780d0353ede8580b41ec9e16f622c94c87 /Zotlabs/Module/Follow.php
parentc29261487cdecda4282df25769540bc4fa20631d (diff)
parent1582b8bc9620a661823c608c0c7023a70554214b (diff)
downloadvolse-hubzilla-3f053611bdbbd4a26a5d9c76a294b7ada07f0726.tar.gz
volse-hubzilla-3f053611bdbbd4a26a5d9c76a294b7ada07f0726.tar.bz2
volse-hubzilla-3f053611bdbbd4a26a5d9c76a294b7ada07f0726.zip
Merge branch 'dev' into air
Diffstat (limited to 'Zotlabs/Module/Follow.php')
-rw-r--r--Zotlabs/Module/Follow.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/Zotlabs/Module/Follow.php b/Zotlabs/Module/Follow.php
index 11febd8fc..4fe20f56b 100644
--- a/Zotlabs/Module/Follow.php
+++ b/Zotlabs/Module/Follow.php
@@ -14,7 +14,7 @@ use Zotlabs\Daemon\Master;
class Follow extends Controller {
function init() {
-
+
if (ActivityStreams::is_as_request() && argc() == 2) {
$abook_id = intval(argv(1));
@@ -73,11 +73,11 @@ class Follow extends Controller {
$url = notags(trim(punify($_REQUEST['url'])));
$return_url = $_SESSION['return_url'];
$confirm = intval($_REQUEST['confirm']);
- $interactive = (($_REQUEST['interactive']) ? intval($_REQUEST['interactive']) : 1);
+ $interactive = (($_REQUEST['interactive']) ? intval($_REQUEST['interactive']) : 1);
$channel = App::get_channel();
$result = Connect::connect($channel,$url);
-
+
if ($result['success'] == false) {
if ($result['message']) {
notice($result['message']);
@@ -89,9 +89,9 @@ class Follow extends Controller {
json_return_and_die($result);
}
}
-
+
info( t('Connection added.') . EOL);
-
+
$clone = array();
foreach ($result['abook'] as $k => $v) {
if (strpos($k,'abook_') === 0) {
@@ -101,30 +101,30 @@ class Follow extends Controller {
unset($clone['abook_id']);
unset($clone['abook_account']);
unset($clone['abook_channel']);
-
+
$abconfig = load_abconfig($channel['channel_id'],$clone['abook_xchan']);
if ($abconfig) {
$clone['abconfig'] = $abconfig;
}
Libsync::build_sync_packet(0, [ 'abook' => [ $clone ] ], true);
-
+
$can_view_stream = their_perms_contains($channel['channel_id'],$clone['abook_xchan'],'view_stream');
-
+
// If we can view their stream, pull in some posts
-
+
if (($can_view_stream) || ($result['abook']['xchan_network'] === 'rss')) {
Master::Summon([ 'Onepoll', $result['abook']['abook_id'] ]);
}
-
+
if ($interactive) {
goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?follow=1');
}
else {
json_return_and_die([ 'success' => true ]);
}
-
+
}
-
+
function get() {
if (! local_channel()) {
return login();