Merge branch 'hotfix/0.0.9.1' into develop
This commit is contained in:
commit
f5a7866d00
2 changed files with 7 additions and 5 deletions
|
@ -20,10 +20,9 @@ class SendWebMentions extends Job implements ShouldQueue
|
||||||
* @param Note $note
|
* @param Note $note
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(Note $note, Client $guzzle = null)
|
public function __construct(Note $note)
|
||||||
{
|
{
|
||||||
$this->note = $note;
|
$this->note = $note;
|
||||||
$this->guzzle = $guzzle ?? new Client();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,16 +31,16 @@ class SendWebMentions extends Job implements ShouldQueue
|
||||||
* @param \GuzzleHttp\Client $guzzle
|
* @param \GuzzleHttp\Client $guzzle
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(Client $guzzle)
|
||||||
{
|
{
|
||||||
//grab the URLs
|
//grab the URLs
|
||||||
$urlsInReplyTo = explode(' ', $this->note->in_reply_to);
|
$urlsInReplyTo = explode(' ', $this->note->in_reply_to);
|
||||||
$urlsNote = $this->getLinks($this->note->note);
|
$urlsNote = $this->getLinks($this->note->note);
|
||||||
$urls = array_filter(array_merge($urlsInReplyTo, $urlsNote)); //filter out none URLs
|
$urls = array_filter(array_merge($urlsInReplyTo, $urlsNote)); //filter out none URLs
|
||||||
foreach ($urls as $url) {
|
foreach ($urls as $url) {
|
||||||
$endpoint = $this->discoverWebmentionEndpoint($url, $this->guzzle);
|
$endpoint = $this->discoverWebmentionEndpoint($url, $guzzle);
|
||||||
if ($endpoint) {
|
if ($endpoint) {
|
||||||
$this->guzzle->post($endpoint, [
|
$guzzle->post($endpoint, [
|
||||||
'form_params' => [
|
'form_params' => [
|
||||||
'source' => $this->note->longurl,
|
'source' => $this->note->longurl,
|
||||||
'target' => $url,
|
'target' => $url,
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Version 0.0.9.1 (2016-09-07)
|
||||||
|
- Fix an issue with syndicating notes.
|
||||||
|
|
||||||
## Version 0.0.9 (2016-09-06)
|
## Version 0.0.9 (2016-09-06)
|
||||||
- Adding jsonb column to store webmentions’ mf2.
|
- 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
|
* As of L5.2 this needs a custom command to drop NOT NULL from content, L5.3 should allow a fix for this
|
||||||
|
|
Loading…
Add table
Reference in a new issue