Removed external pubsubhubbub URL

This commit is contained in:
Michael 2017-08-25 02:58:38 +00:00
parent 417ea99ba5
commit 5c53544118
5 changed files with 8 additions and 57 deletions

View File

@ -60,10 +60,6 @@ $a->config['system']['maximagesize'] = 800000;
$a->config['php_path'] = 'php'; $a->config['php_path'] = 'php';
// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts
$a->config['system']['huburl'] = '[internal]';
// Server-to-server private message encryption (RINO) is allowed by default. // Server-to-server private message encryption (RINO) is allowed by default.
// Encryption will only be provided if this setting is set to a non zero value // Encryption will only be provided if this setting is set to a non zero value
// set to 0 to disable, 2 to enable, 1 is deprecated // set to 0 to disable, 2 to enable, 1 is deprecated

View File

@ -205,8 +205,6 @@ function notifier_run(&$argv, &$argc){
$walltowall = ((($top_level) && ($owner['id'] != $items[0]['contact-id'])) ? true : false); $walltowall = ((($top_level) && ($owner['id'] != $items[0]['contact-id'])) ? true : false);
$hub = get_config('system','huburl');
// Should the post be transmitted to Diaspora? // Should the post be transmitted to Diaspora?
$diaspora_delivery = true; $diaspora_delivery = true;
@ -563,16 +561,7 @@ function notifier_run(&$argv, &$argc){
} }
// Notify PuSH subscribers (Used for OStatus distribution of regular posts) // Notify PuSH subscribers (Used for OStatus distribution of regular posts)
if ($push_notify && strlen($hub)) { if ($push_notify) {
$hubs = explode(',', $hub);
if (count($hubs)) {
foreach ($hubs as $h) {
$h = trim($h);
if (! strlen($h)) {
continue;
}
if ($h === '[internal]') {
// Set push flag for PuSH subscribers to this topic, // Set push flag for PuSH subscribers to this topic,
// they will be notified in queue.php // they will be notified in queue.php
q("UPDATE `push_subscriber` SET `push` = 1 ". q("UPDATE `push_subscriber` SET `push` = 1 ".
@ -580,18 +569,6 @@ function notifier_run(&$argv, &$argc){
logger('Activating internal PuSH for item '.$item_id, LOGGER_DEBUG); logger('Activating internal PuSH for item '.$item_id, LOGGER_DEBUG);
} else {
$params = 'hub.mode=publish&hub.url=' . urlencode( App::get_baseurl() . '/dfrn_poll/' . $owner['nickname'] );
post_url($h,$params);
logger('publish for item '.$item_id.' ' . $h . ' ' . $params . ' returned ' . $a->get_curl_code());
}
if (count($hubs) > 1) {
sleep(7); // try and avoid multiple hubs responding at precisely the same time
}
}
}
// Handling the pubsubhubbub requests // Handling the pubsubhubbub requests
proc_run(array('priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true), proc_run(array('priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true),
'include/pubsubpublish.php'); 'include/pubsubpublish.php');

View File

@ -1495,24 +1495,9 @@ class ostatus {
* @param object $root XML root element where the hub links are added * @param object $root XML root element where the hub links are added
*/ */
public static function hublinks($doc, $root, $nick) { public static function hublinks($doc, $root, $nick) {
$hub = get_config('system','huburl');
$hubxml = '';
if (strlen($hub)) {
$hubs = explode(',', $hub);
if (count($hubs)) {
foreach ($hubs as $h) {
$h = trim($h);
if (! strlen($h))
continue;
if ($h === '[internal]') {
$h = App::get_baseurl() . '/pubsubhubbub/'.$nick; $h = App::get_baseurl() . '/pubsubhubbub/'.$nick;
}
xml::add_element($doc, $root, "link", "", array("href" => $h, "rel" => "hub")); xml::add_element($doc, $root, "link", "", array("href" => $h, "rel" => "hub"));
} }
}
}
}
/** /**
* @brief Adds attachement data to the XML document * @brief Adds attachement data to the XML document

View File

@ -47,9 +47,6 @@ $a->config['system']['maximagesize'] = 800000;
$a->config['php_path'] = '/usr/bin/php'; $a->config['php_path'] = '/usr/bin/php';
// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts
$a->config['system']['huburl'] = '[internal]';
// Server-to-server private message encryption (RINO) is allowed by default. // Server-to-server private message encryption (RINO) is allowed by default.
// Encryption will only be provided if this setting is true and the // Encryption will only be provided if this setting is true and the

View File

@ -77,10 +77,6 @@ $a->config['max_import_size'] = 200000;
$a->config['system']['maximagesize'] = 800000; $a->config['system']['maximagesize'] = 800000;
// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts
$a->config['system']['huburl'] = '[internal]';
// Server-to-server private message encryption (RINO) is allowed by default. // Server-to-server private message encryption (RINO) is allowed by default.
// Encryption will only be provided if this setting is set to a non zero value // Encryption will only be provided if this setting is set to a non zero value
// set to 0 to disable, 2 to enable, 1 is deprecated // set to 0 to disable, 2 to enable, 1 is deprecated