X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FWellKnown%2FXSocialRelay.php;h=bf767a3e7ba0f0d34b5570ab42596a9629dc73e6;hb=69b7923df2beed71419bc38e61ca9755fad24b12;hp=ba67e6283cc589ec6a43a3834af2477e0ae80528;hpb=0384bf3e7694ccafe84978de6acebaa3a110c32e;p=friendica.git diff --git a/src/Module/WellKnown/XSocialRelay.php b/src/Module/WellKnown/XSocialRelay.php index ba67e6283c..bf767a3e7b 100644 --- a/src/Module/WellKnown/XSocialRelay.php +++ b/src/Module/WellKnown/XSocialRelay.php @@ -1,6 +1,6 @@ get('system', 'relay_subscribe', false); - - if ($subscribe) { - $scope = $config->get('system', 'relay_scope', SR_SCOPE_ALL); - } else { - $scope = SR_SCOPE_NONE; - } + $scope = $config->get('system', 'relay_scope'); $systemTags = []; $userTags = []; - if ($scope == SR_SCOPE_TAGS) { + if ($scope == Relay::SCOPE_TAGS) { $server_tags = $config->get('system', 'relay_server_tags'); $tagitems = explode(',', $server_tags); /// @todo Check if it was better to use "strtolower" on the tags - foreach ($tagitems AS $tag) { + foreach ($tagitems as $tag) { $systemTags[] = trim($tag, '# '); } @@ -63,7 +58,7 @@ class XSocialRelay extends BaseModule $tagList = array_unique(array_merge($systemTags, $userTags)); $relay = [ - 'subscribe' => $subscribe, + 'subscribe' => ($scope != Relay::SCOPE_NONE), 'scope' => $scope, 'tags' => $tagList, 'protocols' => [