Change mp-syndicate-to
to syndicate-to
This commit is contained in:
parent
8d7b38169b
commit
578096419f
4 changed files with 10 additions and 9 deletions
|
@ -160,10 +160,10 @@ class MicropubClientController extends Controller
|
|||
'contents' => $request->input('reply-to'),
|
||||
];
|
||||
}
|
||||
if ($request->input('mp-syndicate-to')) {
|
||||
foreach ($request->input('mp-syndicate-to') as $syn) {
|
||||
if ($request->input('syndicate-to')) {
|
||||
foreach ($request->input('syndicate-to') as $syn) {
|
||||
$multipart[] = [
|
||||
'name' => 'mp-syndicate-to',
|
||||
'name' => 'syndicate-to',
|
||||
'contents' => $syn,
|
||||
];
|
||||
}
|
||||
|
@ -320,14 +320,14 @@ class MicropubClientController extends Controller
|
|||
if ($syndicationTargets === null) {
|
||||
return;
|
||||
}
|
||||
$mpSyndicateTo = [];
|
||||
$syndicateTo = [];
|
||||
$parts = explode(';', $syndicationTargets);
|
||||
foreach ($parts as $part) {
|
||||
$target = explode('=', $part);
|
||||
$mpSyndicateTo[] = urldecode($target[1]);
|
||||
$syndicateTo[] = urldecode($target[1]);
|
||||
}
|
||||
if (count($mpSyndicateTo) > 0) {
|
||||
return $mpSyndicateTo;
|
||||
if (count($syndicateTo) > 0) {
|
||||
return $syndicateTo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ class MicropubController extends Controller
|
|||
//we have a valid token, is `syndicate-to` set?
|
||||
if ($request->input('q') === 'syndicate-to') {
|
||||
$content = http_build_query([
|
||||
'mp-syndicate-to' => 'twitter.com/jonnybarnes',
|
||||
'syndicate-to' => 'twitter.com/jonnybarnes',
|
||||
]);
|
||||
|
||||
return (new Response($content, 200))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue