aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/diaspora.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 33ad4211b..77a400604 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -2371,6 +2371,24 @@ function diaspora_profile($importer,$xml,$msg) {
function diaspora_share($owner,$contact) {
$a = get_app();
+
+ $enabled = intval(get_config('system','diaspora_enabled'));
+ if(! $enabled) {
+ logger('diaspora_share: disabled');
+ return;
+ }
+
+ $allowed = get_pconfig($owner['channel_id'],'system','diaspora_allowed');
+ if($allowed === false)
+ $allowed = 1;
+
+ if(! intval($allowed)) {
+ logger('diaspora_share: disallowed for channel ' . $importer['channel_name']);
+ return;
+ }
+
+
+
$myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
if(! array_key_exists('xchan_hash',$contact)) {
@@ -2947,6 +2965,14 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch,$queue_run=false)
return 200;
}
+ $allowed = get_pconfig($owner['channel_id'],'system','diaspora_allowed');
+ if($allowed === false)
+ $allowed = 1;
+
+ if(! intval($allowed)) {
+ return 200;
+ }
+
if($public_batch)
$dest_url = $contact['hubloc_callback'] . '/public';
else