diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index a7aed15067..24094ebc69 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -174,7 +174,7 @@ class OStatusPlugin extends Plugin $salmon = common_local_url($salmonAction, array('id' => $id)); $feed->addLink($salmon, array('rel' => Salmon::REL_SALMON)); - // XXX: these are deprecated + // XXX: these are deprecated, but StatusNet only looks for NS_REPLIES $feed->addLink($salmon, array('rel' => Salmon::NS_REPLIES)); $feed->addLink($salmon, array('rel' => Salmon::NS_MENTIONS)); } @@ -1323,7 +1323,8 @@ class OStatusPlugin extends Plugin array('id' => $target->id)); $xrd->links[] = new XML_XRD_Element_Link(Salmon::REL_SALMON, $salmon_url); - // XXX : Deprecated - to be removed. + + // XXX: these are deprecated, but StatusNet only looks for NS_REPLIES $xrd->links[] = new XML_XRD_Element_Link(Salmon::NS_REPLIES, $salmon_url); $xrd->links[] = new XML_XRD_Element_Link(Salmon::NS_MENTIONS, $salmon_url); diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index 46c73ac48e..74e19ce9eb 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -1110,7 +1110,10 @@ class Ostatus_profile extends Managed_DataObject $huburi = $discover->getHubLink(); $hints['hub'] = $huburi; - $salmonuri = $discover->getAtomLink(Salmon::NS_REPLIES); + + // XXX: NS_REPLIES is deprecated anyway, so let's remove it in the future. + $salmonuri = $discover->getAtomLink(Salmon::REL_SALMON) + ?: $discover->getAtomLink(Salmon::NS_REPLIES); $hints['salmon'] = $salmonuri; if (!$huburi && !common_config('feedsub', 'fallback_hub')) { @@ -1489,7 +1492,9 @@ class Ostatus_profile extends Managed_DataObject $discover = new FeedDiscovery(); $discover->discoverFromFeedURL($hints['feedurl']); } - $salmonuri = $discover->getAtomLink(Salmon::NS_REPLIES); + // XXX: NS_REPLIES is deprecated anyway, so let's remove it in the future. + $salmonuri = $discover->getAtomLink(Salmon::REL_SALMON) + ?: $discover->getAtomLink(Salmon::NS_REPLIES); } if (array_key_exists('hub', $hints)) { diff --git a/plugins/OStatus/lib/discoveryhints.php b/plugins/OStatus/lib/discoveryhints.php index ae2d5ad618..ed37452b5f 100644 --- a/plugins/OStatus/lib/discoveryhints.php +++ b/plugins/OStatus/lib/discoveryhints.php @@ -29,8 +29,9 @@ class DiscoveryHints { case WebFingerResource::PROFILEPAGE: $hints['profileurl'] = $link->href; break; - case Salmon::NS_MENTIONS: - case Salmon::NS_REPLIES: + case Salmon::REL_SALMON: + case Salmon::NS_MENTIONS: // XXX: deprecated, remove in the future + case Salmon::NS_REPLIES: // XXX: deprecated, remove in the future $hints['salmon'] = $link->href; break; case Discovery::UPDATESFROM: diff --git a/plugins/OStatus/scripts/update-profile.php b/plugins/OStatus/scripts/update-profile.php index ff6a149c60..a0d007a8af 100644 --- a/plugins/OStatus/scripts/update-profile.php +++ b/plugins/OStatus/scripts/update-profile.php @@ -56,7 +56,8 @@ print "Re-running feed discovery for profile URL $oprofile->uri\n"; $discover = new FeedDiscovery(); $feedurl = $discover->discoverFromURL($oprofile->uri); $huburi = $discover->getHubLink(); -$salmonuri = $discover->getAtomLink(Salmon::NS_REPLIES); +$salmonuri = $discover->getAtomLink(Salmon::REL_SALMON) + ?: $discover->getAtomLink(Salmon::NS_REPLIES); print " Feed URL: $feedurl\n"; print " Hub URL: $huburi\n";