updating to use latest salmon NS definitions
This commit is contained in:
parent
fc576562a3
commit
bbb0a7d5bc
|
@ -149,7 +149,8 @@ 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'));
|
||||
$feed->addLink($salmon, array('rel' => Salmon::NS_REPLIES));
|
||||
$feed->addLink($salmon, array('rel' => Salmon::NS_MENTIONS));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -80,10 +80,14 @@ class XrdAction extends Action
|
|||
'href' => common_local_url('foaf',
|
||||
array('nickname' => $nick)));
|
||||
|
||||
$salmon_url = common_local_url('salmon',
|
||||
// Salmon
|
||||
$salmon_url = common_local_url('usersalmon',
|
||||
array('id' => $this->user->id));
|
||||
|
||||
$xrd->links[] = array('rel' => 'salmon',
|
||||
$xrd->links[] = array('rel' => Salmon::NS_REPLIES,
|
||||
'href' => $salmon_url);
|
||||
|
||||
$xrd->links[] = array('rel' => Salmon::NS_MENTIONS,
|
||||
'href' => $salmon_url);
|
||||
|
||||
// Get this user's keypair
|
||||
|
|
|
@ -707,7 +707,7 @@ class Ostatus_profile extends Memcached_DataObject
|
|||
|
||||
$huburi = $discover->getAtomLink('hub');
|
||||
$hints['hub'] = $huburi;
|
||||
$salmonuri = $discover->getAtomLink('salmon');
|
||||
$salmonuri = $discover->getAtomLink(Salmon::NS_REPLIES);
|
||||
$hints['salmon'] = $salmonuri;
|
||||
|
||||
if (!$huburi) {
|
||||
|
@ -991,7 +991,7 @@ class Ostatus_profile extends Memcached_DataObject
|
|||
$discover = new FeedDiscovery();
|
||||
$discover->discoverFromFeedURL($hints['feedurl']);
|
||||
}
|
||||
$salmonuri = $discover->getAtomLink('salmon');
|
||||
$salmonuri = $discover->getAtomLink(Salmon::NS_REPLIES);
|
||||
}
|
||||
|
||||
if (array_key_exists('hub', $hints)) {
|
||||
|
@ -1299,7 +1299,7 @@ class Ostatus_profile extends Memcached_DataObject
|
|||
case Discovery::PROFILEPAGE:
|
||||
$profileUrl = $link['href'];
|
||||
break;
|
||||
case 'salmon':
|
||||
case Salmon::NS_REPLIES:
|
||||
$salmonEndpoint = $link['href'];
|
||||
break;
|
||||
case Discovery::UPDATESFROM:
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
*/
|
||||
class Salmon
|
||||
{
|
||||
|
||||
const NS_REPLIES = "http://salmon-protocol.org/ns/salmon-replies";
|
||||
|
||||
const NS_MENTIONS = "http://salmon-protocol.org/ns/salmon-mention";
|
||||
|
||||
/**
|
||||
* Sign and post the given Atom entry as a Salmon message.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user