aboutsummaryrefslogtreecommitdiffstats
path: root/include/onepoll.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-03 19:34:04 -0800
committerfriendica <info@friendica.com>2013-01-03 19:34:04 -0800
commitbec7d9f483d63a2330694cc34377b0f79d1afcba (patch)
treed3f7ac3ad142dcd1002972899e63013a64f81f61 /include/onepoll.php
parentcf0e960a90cf4216d85d38d23d147cb62cd70644 (diff)
downloadvolse-hubzilla-bec7d9f483d63a2330694cc34377b0f79d1afcba.tar.gz
volse-hubzilla-bec7d9f483d63a2330694cc34377b0f79d1afcba.tar.bz2
volse-hubzilla-bec7d9f483d63a2330694cc34377b0f79d1afcba.zip
temporary feed import/export (public only for the moment) until this is integrated with remote permissions
Diffstat (limited to 'include/onepoll.php')
-rw-r--r--include/onepoll.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/onepoll.php b/include/onepoll.php
index a2b3f7a9f..e2636d84a 100644
--- a/include/onepoll.php
+++ b/include/onepoll.php
@@ -90,6 +90,25 @@ function onepoll_run($argv, $argc){
}
+ if($contact['xchan_connurl']) {
+ $feedurl = str_replace('/poco/','/zotfeed/',$channel['xchan_connurl']);
+
+ $x = z_fetch_url($feedurl . '?f=$mindate=' . $last_update);
+ if($x['success']) {
+ $total = 0;
+ $j = json_decode($x['body'],);
+ if($j['success'] && $j['messages']) {
+ foreach($j['messages'] as $message) {
+ $results = process_delivery(array('hash' => $contact['xchan_hash']),$message,
+ array(array('hash' => $importer['xchan_hash'])), false);
+ $total ++;
+ }
+ logger("onepoll: $total messages processed");
+ }
+ }
+ }
+
+
// fetch some items
// set last updated timestamp