mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-26 08:53:16 +00:00
pumpio: contacts are synced once a day
This commit is contained in:
parent
e3bf2b1d61
commit
c2c916e50c
1 changed files with 13 additions and 3 deletions
|
@ -581,11 +581,20 @@ function pumpio_cron($a,$b) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
logger('pumpio: importing timeline from user '.$rr['uid']);
|
logger('pumpio: importing timeline from user '.$rr['uid']);
|
||||||
pumpio_fetchinbox($a, $rr['uid']);
|
pumpio_fetchinbox($a, $rr['uid']);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// To-Do:
|
// check for new contacts once a day
|
||||||
//pumpio_getallusers($a, $uid);
|
$last_contact_check = get_pconfig($rr['uid'],'pumpio','contact_check');
|
||||||
|
if($last_contact_check)
|
||||||
|
$next_contact_check = $last_contact_check + 86400;
|
||||||
|
else
|
||||||
|
$next_contact_check = 0;
|
||||||
|
|
||||||
|
if($next_contact_check <= time()) {
|
||||||
|
pumpio_getallusers($a, $rr["uid"]);
|
||||||
|
set_pconfig($rr['uid'],'pumpio','contact_check',time());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
logger('pumpio: cron_end');
|
logger('pumpio: cron_end');
|
||||||
|
|
||||||
|
@ -1509,6 +1518,7 @@ function pumpio_fetchallcomments($a, $uid, $id) {
|
||||||
Bugs:
|
Bugs:
|
||||||
|
|
||||||
To-Do:
|
To-Do:
|
||||||
|
- contact sync every day
|
||||||
|
|
||||||
Could be hard to do:
|
Could be hard to do:
|
||||||
- edit own notes
|
- edit own notes
|
||||||
|
|
Loading…
Reference in a new issue