return $this;
}
- function post($text) {
+ function post($text, $provider = "diasphp") {
// post-daten vorbereiten
$datatopost = json_encode(array(
'aspect_ids' => 'public',
- 'status_message' => array('text' => $text)
+ 'status_message' => array('text' => $text,
+ 'provider_display_name' => $provider)
));
// header vorbereiten
}
function diaspora_queue_hook(&$a,&$b) {
+ $hostname = $a->get_hostname();
+
$qi = q("SELECT * FROM `queue` WHERE `network` = '%s'",
dbesc(NETWORK_DIASPORA2)
);
logger('diaspora_queue: try to log in '.$diaspora_username, LOGGER_DEBUG);
$conn->login($diaspora_username, $diaspora_password);
logger('diaspora_queue: try to send '.$body, LOGGER_DEBUG);
- $conn->post($post);
+ $conn->post($post, $hostname);
logger('diaspora_queue: send '.$userdata['uid'].' success', LOGGER_DEBUG);
function diaspora_send(&$a,&$b) {
+ $hostname = $a->get_hostname();
logger('diaspora_send: invoked');
logger('diaspora_send: try to send '.$body, LOGGER_DEBUG);
//throw new Exception('Test');
- $conn->post($body);
+ $conn->post($body, $hostname);
logger('diaspora_send: success');
} catch (Exception $e) {
}
}
- logger('fbsync: cron_end');
+ logger('fbsync_cron: cron_end');
set_config('fbsync','last_poll', time());
}