From d584a10d1e5ab35ea40231c203cb00dd39eadd9e Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Wed, 13 Jul 2016 17:32:10 +0100 Subject: [PATCH 1/3] Better syndication parsing --- app/Http/Controllers/MicropubClientController.php | 5 ++++- changelog.md | 3 +++ resources/views/templates/new-note-form.blade.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) 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..dc11a1e3 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # Changelog +## Version {next} + - 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 From 4ca621f0e33241340200334f4db859c69523a65a Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Wed, 13 Jul 2016 20:10:15 +0100 Subject: [PATCH 2/3] Fix the syndication list test to match better parsing support --- tests/MicropubClientTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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, From b4d950806c4bd241121d173c118cef44b1c82cd9 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Fri, 15 Jul 2016 12:09:51 +0100 Subject: [PATCH 3/3] Bump version number to 0.0.8.2 --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index dc11a1e3..72061a05 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,6 @@ # Changelog -## Version {next} +## 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)