aboutsummaryrefslogtreecommitdiffstats
path: root/include/onepoll.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-17 16:50:32 -0800
committerfriendica <info@friendica.com>2013-11-17 16:50:32 -0800
commit06e0272db873ad0b7dbc96596e92b8c635f940a2 (patch)
treecc9c69c446e13de010baa4fe2dcd2c401aef4f94 /include/onepoll.php
parent28b0eb9c330261ea6a8cd36248c194b6b153f5e6 (diff)
downloadvolse-hubzilla-06e0272db873ad0b7dbc96596e92b8c635f940a2.tar.gz
volse-hubzilla-06e0272db873ad0b7dbc96596e92b8c635f940a2.tar.bz2
volse-hubzilla-06e0272db873ad0b7dbc96596e92b8c635f940a2.zip
populate some posts when somebody is granted "read stream" permission
Diffstat (limited to 'include/onepoll.php')
-rw-r--r--include/onepoll.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/onepoll.php b/include/onepoll.php
index 50c2566be..5e5589228 100644
--- a/include/onepoll.php
+++ b/include/onepoll.php
@@ -98,8 +98,11 @@ function onepoll_run($argv, $argc){
return;
if($contact['xchan_connurl']) {
- $feedurl = str_replace('/poco/','/zotfeed/',$channel['xchan_connurl']);
- $x = z_fetch_url($feedurl . '?f=&mindate=' . $last_update);
+ $feedurl = str_replace('/poco/','/zotfeed/',$contact['xchan_connurl']);
+ $x = z_fetch_url($feedurl . '?f=&mindate=' . urlencode($last_update));
+
+ logger('feed_update: ' . print_r($x,true), LOGGER_DATA);
+
if($x['success']) {
$total = 0;
logger('onepoll: feed update ' . $contact['xchan_name']);
@@ -107,7 +110,7 @@ function onepoll_run($argv, $argc){
$j = json_decode($x['body'],true);
if($j['success'] && $j['messages']) {
foreach($j['messages'] as $message) {
- $results = process_delivery(array('hash' => $contact['xchan_hash']),$message,
+ $results = process_delivery(array('hash' => $contact['xchan_hash']), get_item_elements($message),
array(array('hash' => $importer['xchan_hash'])), false);
$total ++;
}