diff --git a/app/Jobs/SendWebMentions.php b/app/Jobs/SendWebMentions.php index 87f3dfa2..4799a426 100644 --- a/app/Jobs/SendWebMentions.php +++ b/app/Jobs/SendWebMentions.php @@ -20,10 +20,9 @@ class SendWebMentions extends Job implements ShouldQueue * @param Note $note * @return void */ - public function __construct(Note $note, Client $guzzle = null) + public function __construct(Note $note) { $this->note = $note; - $this->guzzle = $guzzle ?? new Client(); } /** @@ -32,16 +31,16 @@ class SendWebMentions extends Job implements ShouldQueue * @param \GuzzleHttp\Client $guzzle * @return void */ - public function handle() + public function handle(Client $guzzle) { //grab the URLs $urlsInReplyTo = explode(' ', $this->note->in_reply_to); $urlsNote = $this->getLinks($this->note->note); $urls = array_filter(array_merge($urlsInReplyTo, $urlsNote)); //filter out none URLs foreach ($urls as $url) { - $endpoint = $this->discoverWebmentionEndpoint($url, $this->guzzle); + $endpoint = $this->discoverWebmentionEndpoint($url, $guzzle); if ($endpoint) { - $this->guzzle->post($endpoint, [ + $guzzle->post($endpoint, [ 'form_params' => [ 'source' => $this->note->longurl, 'target' => $url, diff --git a/changelog.md b/changelog.md index 2e0f91db..53064210 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # Changelog +## Version 0.0.9.1 (2016-09-07) + - Fix an issue with syndicating notes. + ## Version 0.0.9 (2016-09-06) - Adding jsonb column to store webmentions’ mf2. * As of L5.2 this needs a custom command to drop NOT NULL from content, L5.3 should allow a fix for this