]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
move to rel="salmon" (per latest spec)
authorJames Walker <walkah@walkah.net>
Mon, 2 Aug 2010 17:23:55 +0000 (13:23 -0400)
committerJames Walker <walkah@walkah.net>
Mon, 2 Aug 2010 17:24:38 +0000 (13:24 -0400)
plugins/OStatus/OStatusPlugin.php
plugins/OStatus/lib/salmon.php
plugins/OStatus/lib/xrdaction.php

index c61e2cc5f3984234940b694ea74132ece1d6b9db..c735c02db35443fac34f0a490b1df47c2565d217 100644 (file)
@@ -158,6 +158,9 @@ class OStatusPlugin extends Plugin
 
             // Also, we'll add in the salmon link
             $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_MENTIONS));
         }
index 3d3341bc63fafeef24cc011f6e7296c8b09a5947..ef7719a40c3861513549b11dc6096e89d25d56b5 100644 (file)
  */
 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_MENTIONS = "http://salmon-protocol.org/ns/salmon-mention";
     
     /**
index f1a56e0a84d3b3967b2595d32f2f3f82afd12ed2..71c70b96e8493e91256da45ae1314a41f831b99a 100644 (file)
@@ -76,6 +76,9 @@ class XrdAction extends Action
         $salmon_url = common_local_url('usersalmon',
                                        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,
                               'href' => $salmon_url);