]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Send URL we publish
authorStephen Paul Weber <singpolyma@singpolyma.net>
Sat, 17 Oct 2015 13:38:13 +0000 (13:38 +0000)
committerStephen Paul Weber <singpolyma@singpolyma.net>
Sat, 17 Oct 2015 13:38:13 +0000 (13:38 +0000)
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

index 045fc2f4f7fd232592efff29a111d0b6e2d2e879..9602fd7fceae681a010f359e43b6113a2510b672 100644 (file)
@@ -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)) {