]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Removing rel='ostatus:attention' in favor of Salmon's rel='mentioned'
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 21 Oct 2013 16:42:15 +0000 (18:42 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 21 Oct 2013 16:42:15 +0000 (18:42 +0200)
This was introduced in StatusNet 0.9.x, which is the oldest branch
on the web today as far as I know.

lib/activity.php
lib/activitycontext.php
tests/ActivityGenerationTests.php
tests/ActivityParseTests.php

index 051993ddff3f587237a07a8e4effc692b1724c3f..870ece13ad5524bb6dcf2afac1e4da8193c5b07c 100644 (file)
@@ -627,8 +627,6 @@ class Activity
             }
 
             foreach ($this->context->attention as $attnURI) {
-                $xs->element('link', array('rel' => ActivityContext::ATTENTION,
-                                           'href' => $attnURI));
                 $xs->element('link', array('rel' => ActivityContext::MENTIONED,
                                            'href' => $attnURI));
             }
index e383b05734431c51dd1a6c554ccbfe6679ce941a..bd5bb5f76ef56e6e4f75da987fe980d986463b07 100644 (file)
@@ -54,7 +54,6 @@ class ActivityContext
 
     const POINT     = 'point';
 
-    const ATTENTION    = 'ostatus:attention';
     const MENTIONED    = 'mentioned';
     const CONVERSATION = 'ostatus:conversation';
 
@@ -85,11 +84,7 @@ class ActivityContext
 
             $linkRel = $link->getAttribute(ActivityUtils::REL);
 
-            // XXX: Deprecate this in favour of "mentioned" from Salmon spec
-            // http://salmon-protocol.googlecode.com/svn/trunk/draft-panzer-salmon-00.html#SALR
-            if ($linkRel == self::ATTENTION) {
-                $attention[] = $link->getAttribute(self::HREF);
-            } elseif ($linkRel == self::MENTIONED) {
+            if ($linkRel == self::MENTIONED) {
                 $attention[] = $link->getAttribute(self::HREF);
             }
         }
index 30e400e77b554457142e728676b41878faf3317f..4c4db6148aa59e9db9e429bc226b1d7458fb6d0d 100644 (file)
@@ -263,7 +263,6 @@ class ActivityGenerationTests extends PHPUnit_Framework_TestCase
 
         $element = $this->_entryToElement($entry, true);
 
-        $this->assertEquals($this->targetUser1->uri, ActivityUtils::getLink($element, 'ostatus:attention'));
         $this->assertEquals($this->targetUser1->uri, ActivityUtils::getLink($element, 'mentioned'));
     }
 
@@ -283,7 +282,7 @@ class ActivityGenerationTests extends PHPUnit_Framework_TestCase
 
         $element = $this->_entryToElement($entry, true);
 
-        $links = ActivityUtils::getLinks($element, 'ostatus:attention');
+        $links = ActivityUtils::getLinks($element, 'mentioned');
 
         $this->assertEquals(2, count($links));
 
@@ -320,7 +319,6 @@ class ActivityGenerationTests extends PHPUnit_Framework_TestCase
 
         $element = $this->_entryToElement($entry, true);
 
-        $this->assertEquals($this->targetGroup1->uri, ActivityUtils::getLink($element, 'ostatus:attention'));
         $this->assertEquals($this->targetGroup1->uri, ActivityUtils::getLink($element, 'mentioned'));
     }
 
@@ -334,7 +332,7 @@ class ActivityGenerationTests extends PHPUnit_Framework_TestCase
 
         $element = $this->_entryToElement($entry, true);
 
-        $links = ActivityUtils::getLinks($element, 'ostatus:attention');
+        $links = ActivityUtils::getLinks($element, 'mentioned');
 
         $this->assertEquals(2, count($links));
 
index 801cc22c266a68da092f3e3bd1af31c1fede194a..71b90aadb64b9ece84b2186e6420161bb2b7d824 100644 (file)
@@ -533,7 +533,7 @@ $_example4 = <<<EXAMPLE4
  <link rel="related" href="http://example.net/notice/12"/>
  <thr:in-reply-to ref="http://example.net/notice/12" href="http://example.net/notice/12"></thr:in-reply-to>
  <link rel="ostatus:conversation" href="http://example.net/conversation/11"/>
- <link rel="ostatus:attention" href="http://example.net/user/1"/>
+ <link rel="mentioned" href="http://example.net/user/1"/>
  <content type="html">@&lt;span class=&quot;vcard&quot;&gt;&lt;a href=&quot;http://example.net/user/1&quot; class=&quot;url&quot;&gt;&lt;span class=&quot;fn nickname&quot;&gt;evan&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; now is the time for all good men to come to the aid of their country. #&lt;span class=&quot;tag&quot;&gt;&lt;a href=&quot;http://example.net/tag/thetime&quot; rel=&quot;tag&quot;&gt;thetime&lt;/a&gt;&lt;/span&gt;</content>
  <category term="thetime"></category>
 </entry>
@@ -910,7 +910,6 @@ $_example10 = <<<EXAMPLE10
   </poco:urls>
  </author>
  <link rel="ostatus:conversation" href="http://lazarus.local/mublog/conversation/1131"/>
- <link rel="ostatus:attention" href="http://lazarus.local/mublog/group/22/id"/>
  <link rel="mentioned" href="http://lazarus.local/mublog/group/22/id"/>
  <category term="grouptest316173"></category>
  <source>