]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Make the Link header give URI for WebFinger lookup
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 17 Feb 2016 21:36:33 +0000 (22:36 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 17 Feb 2016 21:36:33 +0000 (22:36 +0100)
plugins/WebFinger/WebFingerPlugin.php

index ce8c847aa799c2c744490f3b0e40779810a54f62..1677501a2048539a9a906c04c20337fc23bf2f14 100644 (file)
@@ -144,8 +144,8 @@ class WebFingerPlugin extends Plugin
     public function onStartShowHTML($action)
     {
         if ($action instanceof ShowstreamAction) {
-            $acct = 'acct:'. $action->getTarget()->getNickname() .'@'. common_config('site', 'server');
-            $url = common_local_url('webfinger') . '?resource='.$acct;
+            $resource = $action->getTarget()->getUri();
+            $url = common_local_url('webfinger') . '?resource='.urlencode($resource);
 
             foreach (array(Discovery::JRD_MIMETYPE, Discovery::XRD_MIMETYPE) as $type) {
                 header('Link: <'.$url.'>; rel="'. Discovery::LRDD_REL.'"; type="'.$type.'"', false);