aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-04-16 21:40:43 -0700
committerzotlabs <mike@macgirvin.com>2018-04-16 21:40:43 -0700
commit43e55eb9a6cb66ad040064fca8b8296bcd298a03 (patch)
tree8b67b9cf7b7b13fde7099b29f3ee6feade8974f4 /include/zot.php
parent120e578a6778471cc03a04c47b9af34628fc6c8e (diff)
downloadvolse-hubzilla-43e55eb9a6cb66ad040064fca8b8296bcd298a03.tar.gz
volse-hubzilla-43e55eb9a6cb66ad040064fca8b8296bcd298a03.tar.bz2
volse-hubzilla-43e55eb9a6cb66ad040064fca8b8296bcd298a03.zip
Active channels information is a bit imprecise. Provide a higher accuracy method. This will require a transition period
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 2ad43f0e5..c2b622277 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -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) {