]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/WellKnown/XSocialRelay.php
Merge pull request #7848 from annando/mail-hooks
[friendica.git] / src / Module / WellKnown / XSocialRelay.php
index 5766a8ce53388a73f3ba11016500e1f8b3044384..5d8f4e817c1c558378fc824f041a2143179baecc 100644 (file)
@@ -11,10 +11,8 @@ use Friendica\Model\Search;
  */
 class XSocialRelay extends BaseModule
 {
-       public static function rawContent()
+       public static function rawContent(array $parameters = [])
        {
-               parent::rawContent();
-
                $app = self::getApp();
                $config = $app->getConfig();
 
@@ -31,11 +29,11 @@ class XSocialRelay extends BaseModule
 
                if ($scope == SR_SCOPE_TAGS) {
                        $server_tags = $config->get('system', 'relay_server_tags');
-                       $tagitems = explode(",", $server_tags);
+                       $tagitems = explode(',', $server_tags);
 
                        /// @todo Check if it was better to use "strtolower" on the tags
                        foreach ($tagitems AS $tag) {
-                               $systemTags[] = trim($tag, "# ");
+                               $systemTags[] = trim($tag, '# ');
                        }
 
                        if ($config->get('system', 'relay_user_tags')) {
@@ -49,10 +47,14 @@ class XSocialRelay extends BaseModule
                        'subscribe' => $subscribe,
                        'scope'     => $scope,
                        'tags'      => $tagList,
-                       'protocols' => ['diaspora' =>
-                                                               ['receive' => $app->getBaseURL() . '/receive/public'],
-                                                       'dfrn'     =>
-                                                               ['receive' => $app->getBaseURL() . '/dfrn_notify']]
+                       'protocols' => [
+                               'diaspora' => [
+                                       'receive' => $app->getBaseURL() . '/receive/public'
+                               ],
+                               'dfrn'     => [
+                                       'receive' => $app->getBaseURL() . '/dfrn_notify'
+                               ]
+                       ]
                ];
 
                header('Content-type: application/json; charset=utf-8');