move to rel="salmon" (per latest spec)

This commit is contained in:
James Walker 2010-08-02 13:23:55 -04:00
parent a1aea74fe2
commit 517c7483d1
3 changed files with 9 additions and 1 deletions

View File

@ -158,6 +158,9 @@ class OStatusPlugin extends Plugin
// Also, we'll add in the salmon link // Also, we'll add in the salmon link
$salmon = common_local_url($salmonAction, array('id' => $id)); $salmon = common_local_url($salmonAction, array('id' => $id));
$feed->addLink($salmon, array('rel' => Salmon::REL_SALMON));
// XXX: these are deprecated
$feed->addLink($salmon, array('rel' => Salmon::NS_REPLIES)); $feed->addLink($salmon, array('rel' => Salmon::NS_REPLIES));
$feed->addLink($salmon, array('rel' => Salmon::NS_MENTIONS)); $feed->addLink($salmon, array('rel' => Salmon::NS_MENTIONS));
} }

View File

@ -28,9 +28,11 @@
*/ */
class Salmon class Salmon
{ {
const REL_SALMON = 'salmon';
const REL_MENTIONED = 'mentioned';
// XXX: these are deprecated
const NS_REPLIES = "http://salmon-protocol.org/ns/salmon-replies"; const NS_REPLIES = "http://salmon-protocol.org/ns/salmon-replies";
const NS_MENTIONS = "http://salmon-protocol.org/ns/salmon-mention"; const NS_MENTIONS = "http://salmon-protocol.org/ns/salmon-mention";
/** /**

View File

@ -76,6 +76,9 @@ class XrdAction extends Action
$salmon_url = common_local_url('usersalmon', $salmon_url = common_local_url('usersalmon',
array('id' => $this->user->id)); array('id' => $this->user->id));
$xrd->links[] = array('rel' => Salmon::REL_SALMON,
'href' => $salmon_url);
// XXX : Deprecated - to be removed.
$xrd->links[] = array('rel' => Salmon::NS_REPLIES, $xrd->links[] = array('rel' => Salmon::NS_REPLIES,
'href' => $salmon_url); 'href' => $salmon_url);