summaryrefslogtreecommitdiff
path: root/plugins/OStatus
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/OStatus')
-rw-r--r--plugins/OStatus/OStatusPlugin.php3
-rw-r--r--plugins/OStatus/actions/xrd.php8
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php6
-rw-r--r--plugins/OStatus/lib/salmon.php5
4 files changed, 16 insertions, 6 deletions
diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php
index 46f986682..89fa45f91 100644
--- a/plugins/OStatus/OStatusPlugin.php
+++ b/plugins/OStatus/OStatusPlugin.php
@@ -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;
diff --git a/plugins/OStatus/actions/xrd.php b/plugins/OStatus/actions/xrd.php
index e6b694d61..4350ad025 100644
--- a/plugins/OStatus/actions/xrd.php
+++ b/plugins/OStatus/actions/xrd.php
@@ -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
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index 091056c54..c6f7378c4 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -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:
diff --git a/plugins/OStatus/lib/salmon.php b/plugins/OStatus/lib/salmon.php
index 9d4359f74..c59de2a14 100644
--- a/plugins/OStatus/lib/salmon.php
+++ b/plugins/OStatus/lib/salmon.php
@@ -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.
*