Merge pull request #9535 from annando/ap-relay

Relay code reworked to support AP delivery
This commit is contained in:
Hypolite Petovan 2020-11-15 20:27:08 -05:00 committed by GitHub
commit a69c98e32f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 285 additions and 206 deletions

View file

@ -67,8 +67,9 @@ class XSocialRelay extends BaseModule
'scope' => $scope,
'tags' => $tagList,
'protocols' => [
'diaspora' => [
'receive' => DI::baseUrl()->get() . '/receive/public'
'activitypub' => [
'actor' => DI::baseUrl()->get() . '/friendica',
'receive' => DI::baseUrl()->get() . '/inbox'
],
'dfrn' => [
'receive' => DI::baseUrl()->get() . '/dfrn_notify'
@ -76,6 +77,10 @@ class XSocialRelay extends BaseModule
]
];
if (DI::config()->get("system", "diaspora_enabled")) {
$relay['protocols']['diaspora'] = ['receive' => DI::baseUrl()->get() . '/receive/public'];
}
header('Content-type: application/json; charset=utf-8');
echo json_encode($relay, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
exit;