From 9a53be4669e53ba343f4c6433405ae8de747a86f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 2 Aug 2010 16:08:54 -0700 Subject: Initial support for third-party fallback hub such as Superfeedr for feed subscriptions. If set up, this hub will be used to subscribe to feeds that don't specify a hub of their own. Assumes that the fallback hub will, in fact, handle polling and updates for any feed we throw at it! Authentication may be specified for the fallback hub. Example: $config['feedsub']['fallback_hub'] = 'https://superfeedr.com/hubbub'; $config['feedsub']['hub_user'] = 'abcd'; $config['feedsub']['hub_pass'] = 'ckcmdkmckdmkcdk'; Also: * Fix for WordPress-RSS-via-Superfeedr-Atom; if we have info but no ID from a native ActivityStreams actor, don't freak out in the low-level processing code that checks for identity matches. * enhanced messages for low-level FeedSub exceptions if they make it to outside display --- plugins/OStatus/lib/feeddiscovery.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'plugins/OStatus/lib/feeddiscovery.php') diff --git a/plugins/OStatus/lib/feeddiscovery.php b/plugins/OStatus/lib/feeddiscovery.php index 4ac243832..a55399d7c 100644 --- a/plugins/OStatus/lib/feeddiscovery.php +++ b/plugins/OStatus/lib/feeddiscovery.php @@ -87,6 +87,16 @@ class FeedDiscovery return ActivityUtils::getLink($this->root, $rel, $type); } + /** + * Get the referenced PuSH hub link from an Atom feed. + * + * @return mixed string or false + */ + public function getHubLink() + { + return $this->getAtomLink('hub'); + } + /** * @param string $url * @param bool $htmlOk pass false here if you don't want to follow web pages. -- cgit v1.2.3-54-g00ecf