Removing rel='ostatus:attention' in favor of Salmon's rel='mentioned'

This was introduced in StatusNet 0.9.x, which is the oldest branch
on the web today as far as I know.
This commit is contained in:
Mikael Nordfeldth 2013-10-21 18:42:15 +02:00
parent 2e3ef4cc07
commit 8004849305
4 changed files with 4 additions and 14 deletions

View 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));
}

View 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);
}
}

View 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));

View 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>