aboutsummaryrefslogtreecommitdiffstats
path: root/include/onepoll.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-10-30 19:15:03 -0700
committerfriendica <info@friendica.com>2014-10-30 19:15:03 -0700
commit28a35261dbc8c21e27ca4a449ff5cd6cb0501c8a (patch)
treeae912b6d5a5963bd5cbbdc29329ec542ba6c5e7c /include/onepoll.php
parente219268a6e968d4024bb72c7990b3f00639d73b7 (diff)
downloadvolse-hubzilla-28a35261dbc8c21e27ca4a449ff5cd6cb0501c8a.tar.gz
volse-hubzilla-28a35261dbc8c21e27ca4a449ff5cd6cb0501c8a.tar.bz2
volse-hubzilla-28a35261dbc8c21e27ca4a449ff5cd6cb0501c8a.zip
What this checkin does is catch the case where a comment arrived and there's a missing top-level post to match it with. So we'll send a request back to the sender that you've never seen this thread and please send a fresh copy of the entire conversation to date. We could soon have posts in the matrix from different platforms from days gone by, which have been migrated into the modern world. We'll be polite and not deliver these to everybody. However, if someone comments on one of these antique threads we wouldn't be able to see it in our own matrix because we won't have a copy of the parent post. So this rectifies that situation. Be aware that item deletion may need to change to keep "hard deleted" items indefinitely so that they don't keep coming back. We'll have to null out the important data of the former item to accomplish the deletion aspect.
Diffstat (limited to 'include/onepoll.php')
-rw-r--r--include/onepoll.php21
1 files changed, 9 insertions, 12 deletions
diff --git a/include/onepoll.php b/include/onepoll.php
index 98d52db93..7a81282b3 100644
--- a/include/onepoll.php
+++ b/include/onepoll.php
@@ -15,12 +15,6 @@ function onepoll_run($argv, $argc){
logger('onepoll: start');
- $manual_id = 0;
- $generation = 0;
-
- $force = false;
- $restart = false;
-
if(($argc > 1) && (intval($argv[1])))
$contact_id = intval($argv[1]);
@@ -28,7 +22,7 @@ function onepoll_run($argv, $argc){
logger('onepoll: no contact');
return;
}
-
+
$d = datetime_convert();
$contacts = q("SELECT abook.*, xchan.*, account.*
@@ -90,7 +84,8 @@ function onepoll_run($argv, $argc){
$x = zot_refresh($contact,$importer);
$responded = false;
- $updated = datetime_convert();
+ $updated = datetime_convert();
+ $connected = datetime_convert();
if(! $x) {
// mark for death by not updating abook_connected, this is caught in include/poller.php
q("update abook set abook_updated = '%s' where abook_id = %d limit 1",
@@ -101,7 +96,7 @@ function onepoll_run($argv, $argc){
else {
q("update abook set abook_updated = '%s', abook_connected = '%s' where abook_id = %d limit 1",
dbesc($updated),
- dbesc($updated),
+ dbesc($connected),
intval($contact['abook_id'])
);
$responded = true;
@@ -120,7 +115,9 @@ function onepoll_run($argv, $argc){
if($fetch_feed) {
$feedurl = str_replace('/poco/','/zotfeed/',$contact['xchan_connurl']);
- $x = z_fetch_url($feedurl . '?f=&mindate=' . urlencode($last_update));
+ $feedurl .= '?f=&mindate=' . urlencode($last_update);
+
+ $x = z_fetch_url($feedurl);
logger('feed_update: ' . print_r($x,true), LOGGER_DATA);
@@ -143,8 +140,8 @@ function onepoll_run($argv, $argc){
}
}
- // fetch some items
- // set last updated timestamp
+
+ // update the poco details for this connection
if($contact['xchan_connurl']) {
$r = q("SELECT xlink_id from xlink