]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Publish rel="me" in Link HTTP headers
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 24 Feb 2016 15:43:09 +0000 (16:43 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 24 Feb 2016 15:43:09 +0000 (16:43 +0100)
actions/showstream.php

index 3ac837a67e84dcdaa7e3da5c3049e335e1428d39..33ec49df99f5748d1b523f3db51bc9c4e0dbc246 100644 (file)
@@ -155,6 +155,17 @@ class ShowstreamAction extends NoticestreamAction
                               sprintf(_('FOAF for %s'), $this->target->getNickname())));
     }
 
+    public function extraHeaders()
+    {
+        parent::extraHeaders();
+        // Publish all the rel="me" in the HTTP headers on our main profile page
+        if (get_class($this) == 'ShowstreamAction') {
+            foreach ($this->target->getRelMes() as $relMe) {
+                header('Link: <'.htmlspecialchars($relMe['href']).'>'.$type.'; rel="me"', false);
+            }
+        }
+    }
+
     function extraHead()
     {
         if ($this->target->bio) {