create update record for accounts on directory server itself during profile changes, re-queue failed directory sync packets, fix account_id index in queue creation, be more selective about updating hubloc_connected (only when we're talking to the associated site). But we still need a way to flag dead accounts and these mechanisms won't cut it, because it isn't a requirement that channels communicate with anybody, except for contacting the directory when the account is created. I think we need to make every channel ping the directory once a month. Then we can find those that have not done so (after syncing with other directories). We can't have the directory just flag dead accounts as this would create a way for an anti-social attacker to become a directory server and mark all the accounts dead.

This commit is contained in:
friendica
2013-10-24 19:38:50 -07:00
parent 3da20b3797
commit 0b0bd3c207
4 changed files with 31 additions and 8 deletions
+17
View File
@@ -49,8 +49,25 @@ function directory_run($argv, $argc){
$packet = zot_build_packet($channel,'refresh');
$z = zot_zot($url,$packet);
// re-queue if unsuccessful
if(! $z['success']) {
$hash = random_string();
q("insert into outq ( outq_hash, outq_account, outq_channel, outq_posturl, outq_async, outq_created, outq_updated, outq_notify, outq_msg )
values ( '%s', %d, %d, '%s', %d, '%s', '%s', '%s', '%s' )",
dbesc($hash),
intval($channel['channel_account_id']),
intval($channel['channel_id']),
dbesc($url),
intval(1),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc($packet),
dbesc('')
);
}
// Now update all the connections
proc_run('php','include/notifier.php','refresh_all',$channel['channel_id']);