From 1d0a448e07fec01ca0b3b90d29aef2341f97febf Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 24 Feb 2016 16:43:09 +0100 Subject: [PATCH] Publish rel="me" in Link HTTP headers --- actions/showstream.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/actions/showstream.php b/actions/showstream.php index 3ac837a67e..33ec49df99 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -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) {