Squashed commit of the following:

commit ce110099a3a2e97a491c7a920126abda585b15f7
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Fri Jan 27 20:39:59 2017 +0000

    syndicate-to is now mp-syndicate-to
This commit is contained in:
Jonny Barnes 2017-01-27 20:41:17 +00:00
parent 7edb224164
commit 13919c207e
3 changed files with 10 additions and 7 deletions

View file

@ -159,10 +159,10 @@ class MicropubClientController extends Controller
'contents' => $request->input('in-reply-to'), 'contents' => $request->input('in-reply-to'),
]; ];
} }
if ($request->input('syndicate-to')) { if ($request->input('mp-syndicate-to')) {
foreach ($request->input('syndicate-to') as $syn) { foreach ($request->input('mp-syndicate-to') as $syn) {
$multipart[] = [ $multipart[] = [
'name' => 'syndicate-to[]', 'name' => 'mp-syndicate-to[]',
'contents' => $syn, 'contents' => $syn,
]; ];
} }

View file

@ -81,8 +81,8 @@ class NoteService
} }
//from a micropub request //from a micropub request
$targets = array_pluck(config('syndication.targets'), 'uid', 'service.name'); $targets = array_pluck(config('syndication.targets'), 'uid', 'service.name');
if (is_string($request->input('syndicate-to'))) { if (is_string($request->input('mp-syndicate-to'))) {
$service = array_search($request->input('syndicate-to')); $service = array_search($request->input('mp-syndicate-to'));
if ($service == 'Twitter') { if ($service == 'Twitter') {
dispatch(new SyndicateToTwitter($note)); dispatch(new SyndicateToTwitter($note));
} }
@ -90,9 +90,9 @@ class NoteService
dispatch(new SyndicateToFacebook($note)); dispatch(new SyndicateToFacebook($note));
} }
} }
if (is_array($request->input('syndicate-to'))) { if (is_array($request->input('mp-syndicate-to'))) {
foreach ($targets as $service => $target) { foreach ($targets as $service => $target) {
if (in_array($target, $request->input('syndicate-to'))) { if (in_array($target, $request->input('mp-syndicate-to'))) {
if ($service == 'Twitter') { if ($service == 'Twitter') {
dispatch(new SyndicateToTwitter($note)); dispatch(new SyndicateToTwitter($note));
} }

View file

@ -1,5 +1,8 @@
# Changelog # Changelog
## Version {next}
- Update `syndicate-to` property to `mp-syndicate-to`
## Version 0.1.7 (2017-01-27) ## Version 0.1.7 (2017-01-27)
- Add a rel=me link to my own domain in my h-card. - Add a rel=me link to my own domain in my h-card.