namespace Friendica\Module\WellKnown;
use Friendica\BaseModule;
+use Friendica\DI;
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();
+ $config = DI::config();
$subscribe = $config->get('system', 'relay_subscribe', false);
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')) {
'subscribe' => $subscribe,
'scope' => $scope,
'tags' => $tagList,
- 'protocols' => ['diaspora' =>
- ['receive' => $app->getBaseURL() . '/receive/public'],
- 'dfrn' =>
- ['receive' => $app->getBaseURL() . '/dfrn_notify']]
+ 'protocols' => [
+ 'diaspora' => [
+ 'receive' => DI::baseUrl()->get() . '/receive/public'
+ ],
+ 'dfrn' => [
+ 'receive' => DI::baseUrl()->get() . '/dfrn_notify'
+ ]
+ ]
];
header('Content-type: application/json; charset=utf-8');