From d9d74ca96c835049fd57f9dc5a58e01e268756de Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Sat, 17 Oct 2015 13:38:13 +0000 Subject: [PATCH] Send URL we publish Webmention and Pingback both need the exact URL we are going to claim to link to to be present in our HTML source, so send them our actual original link. Webmention clients are supposed to resolve this link. Pingback clients may still fail on shortened links. --- plugins/Linkback/LinkbackPlugin.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/Linkback/LinkbackPlugin.php b/plugins/Linkback/LinkbackPlugin.php index 045fc2f4f7..9602fd7fce 100644 --- a/plugins/Linkback/LinkbackPlugin.php +++ b/plugins/Linkback/LinkbackPlugin.php @@ -107,11 +107,15 @@ class LinkbackPlugin extends Plugin $wm = $this->getWebmention($result); if(!empty($wm)) { - $this->webmention($result->final_url, $wm); + // It is the webmention receiver's job to resolve source + // Ref: https://github.com/converspace/webmention/issues/43 + $this->webmention($url, $wm); } else { $pb = $this->getPingback($result); if (!empty($pb)) { - $this->pingback($result->final_url, $pb); + // Pingback still looks for exact URL in our source, so we + // must send what we have + $this->pingback($url, $pb); } else { $tb = $this->getTrackback($result); if (!empty($tb)) { -- 2.39.5