diff --git a/app/Http/Controllers/MicropubClientController.php b/app/Http/Controllers/MicropubClientController.php index 7b69eeb0..adac3d33 100644 --- a/app/Http/Controllers/MicropubClientController.php +++ b/app/Http/Controllers/MicropubClientController.php @@ -322,7 +322,10 @@ class MicropubClientController extends Controller $data = json_decode($syndicationTargets, true); if (array_key_exists('syndicate-to', $data)) { foreach ($data['syndicate-to'] as $syn) { - $syndicateTo[] = $syn['uid']; + $syndicateTo[] = [ + 'target' => $syn['uid'], + 'name' => $syn['name'], + ]; } } if (count($syndicateTo) > 0) { diff --git a/changelog.md b/changelog.md index 338bd998..72061a05 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # Changelog +## Version 0.0.8.2 (2016-07-15) + - Improve syndication parsing to allow better name display on new note form + ## Version 0.0.8.1 (2016-07-13) - Fix anh issue in the syndication target parsing method diff --git a/resources/views/templates/new-note-form.blade.php b/resources/views/templates/new-note-form.blade.php index 17d976eb..bd26b37a 100644 --- a/resources/views/templates/new-note-form.blade.php +++ b/resources/views/templates/new-note-form.blade.php @@ -5,7 +5,7 @@ @if ($micropub === true) - @if($syndication)@endif + @if($syndication)@endif Refresh Syndication Targets
@endif diff --git a/tests/MicropubClientTest.php b/tests/MicropubClientTest.php index 0fb4bdf3..14a6da5a 100644 --- a/tests/MicropubClientTest.php +++ b/tests/MicropubClientTest.php @@ -32,7 +32,12 @@ class MicropubClientTest extends TestCase public function testClientPageRecentAuth() { - $syndication = ['https://twitter.com/jonnybarnes']; + $syndication = [ + [ + 'target' => 'https://twitter.com/jonnybarnes', + 'name' => 'jonnybarnes on Twitter', + ] + ]; $this->withSession([ 'me' => $this->appurl, 'syndication' => $syndication,