Adopt the relay definition according to the suggestions from @jaywink
This commit is contained in:
parent
8612e44d19
commit
40d3e7982c
|
@ -73,8 +73,8 @@ function wk_social_relay()
|
||||||
'subscribe' => $subscribe,
|
'subscribe' => $subscribe,
|
||||||
'scope' => $scope,
|
'scope' => $scope,
|
||||||
'tags' => $taglist,
|
'tags' => $taglist,
|
||||||
'protocols' => ['diaspora' => System::baseUrl() . '/receive/public',
|
'protocols' => ['diaspora' => ['receive' => System::baseUrl() . '/receive/public'],
|
||||||
'dfrn' => System::baseUrl() . '/dfrn_notify']
|
'dfrn' => ['receive' => System::baseUrl() . '/dfrn_notify']]
|
||||||
];
|
];
|
||||||
|
|
||||||
header('Content-type: application/json; charset=utf-8');
|
header('Content-type: application/json; charset=utf-8');
|
||||||
|
|
|
@ -1436,13 +1436,21 @@ class PortableContact
|
||||||
if (isset($data->protocols)) {
|
if (isset($data->protocols)) {
|
||||||
if (isset($data->protocols->diaspora)) {
|
if (isset($data->protocols->diaspora)) {
|
||||||
$fields['network'] = NETWORK_DIASPORA;
|
$fields['network'] = NETWORK_DIASPORA;
|
||||||
|
if (isset($data->protocols->diaspora->receive)) {
|
||||||
|
$fields['batch'] = $data->protocols->diaspora->receive;
|
||||||
|
} elseif (is_string($data->protocols->diaspora)) {
|
||||||
$fields['batch'] = $data->protocols->diaspora;
|
$fields['batch'] = $data->protocols->diaspora;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (isset($data->protocols->dfrn)) {
|
if (isset($data->protocols->dfrn)) {
|
||||||
$fields['network'] = NETWORK_DFRN;
|
$fields['network'] = NETWORK_DFRN;
|
||||||
|
if (isset($data->protocols->dfrn->receive)) {
|
||||||
|
$fields['batch'] = $data->protocols->dfrn->receive;
|
||||||
|
} elseif (is_string($data->protocols->dfrn)) {
|
||||||
$fields['batch'] = $data->protocols->dfrn;
|
$fields['batch'] = $data->protocols->dfrn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Diaspora::setRelayContact($server_url, $fields);
|
Diaspora::setRelayContact($server_url, $fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue