Pass full URL into php-mf2’s parse method

This commit is contained in:
Jonny Barnes 2016-09-17 20:12:16 +01:00
parent 2d1565f6a1
commit 6e04296e2d

View file

@ -44,13 +44,11 @@ class ProcessWebMention extends Job implements ShouldQueue
*/
public function handle(Parser $parser)
{
$sourceURL = parse_url($this->source);
$baseURL = $sourceURL['scheme'] . '://' . $sourceURL['host'];
$remoteContent = $this->getRemoteContent($this->source);
if ($remoteContent === null) {
throw new RemoteContentNotFoundException;
}
$microformats = Mf2\parse($remoteContent, $baseURL);
$microformats = Mf2\parse($remoteContent, $this->source);
$webmentions = WebMention::where('source', $this->source)->get();
foreach ($webmentions as $webmention) {
//check webmention still references target