Active channels information is a bit imprecise. Provide a higher accuracy method. This will require a transition period

This commit is contained in:
zotlabs
2018-04-16 21:40:43 -07:00
parent 120e578a67
commit 43e55eb9a6
6 changed files with 26 additions and 2 deletions

View File

@@ -3208,6 +3208,9 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
$channel = $r[0];
// don't provide these in the export
unset($channel['channel_active']);
unset($channel['channel_password']);
unset($channel['channel_salt']);
@@ -3474,6 +3477,14 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
continue;
}
// if the clone is active, so are we
if(substr($channel['channel_active'],0,10) !== substr(datetime_convert(),0,10)) {
q("UPDATE channel set channel_active = '%s' where channel_id = %d",
dbesc(datetime_convert()),
intval($channel['channel_id'])
);
}
if(array_key_exists('config',$arr) && is_array($arr['config']) && count($arr['config'])) {
foreach($arr['config'] as $cat => $k) {