aboutsummaryrefslogtreecommitdiffstats
path: root/include/notifier.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-09-30 20:24:03 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-09-30 20:24:03 -0700
commit465ba71b584ad596729c23717226a9bdeb896553 (patch)
tree87ccb7f69d45cbedb73691a17da56f0e7bbaac13 /include/notifier.php
parentabe6a3286e80359d03a9f45ee86657bf84a47ac2 (diff)
downloadvolse-hubzilla-465ba71b584ad596729c23717226a9bdeb896553.tar.gz
volse-hubzilla-465ba71b584ad596729c23717226a9bdeb896553.tar.bz2
volse-hubzilla-465ba71b584ad596729c23717226a9bdeb896553.zip
pubsubhubbub - discovery and notifier
Diffstat (limited to 'include/notifier.php')
-rw-r--r--include/notifier.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/notifier.php b/include/notifier.php
index 967f4ff55..c339d2fb3 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -83,6 +83,8 @@
else
killme();
+ $hub = get_config('system','huburl');
+
if($cmd != 'mail') {
require_once('include/group.php');
@@ -138,11 +140,14 @@
$atom = '';
+ $hubxml = ((strlen($hub)) ? '<link rel="hub" href="' . xmlify($hub) . '" />' . "\n" : '');
+
$atom .= replace_macros($feed_template, array(
'$feed_id' => xmlify($a->get_baseurl() . '/profile/' . $owner['nickname'] ),
'$feed_title' => xmlify($owner['name']),
'$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', $updated . '+00:00' , ATOM_TIME)) ,
+ '$hub' => $hubxml,
'$name' => xmlify($owner['name']),
'$profile_page' => xmlify($owner['url']),
'$photo' => xmlify($owner['photo']),
@@ -297,5 +302,10 @@
}
}
+ if((strlen($hub)) && ($cmd !== 'mail') && (followup == false)) {
+ $params = array('hub.mode' => 'publish', 'hub.url' => $a->get_baseurl() . '/dfrn_poll/' . $owner['nickname'] );
+ post_url($hub,$params);
+ }
+
killme();