diff options
author | zotlabs <mike@macgirvin.com> | 2018-03-06 11:39:49 -0800 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-03-07 08:59:29 +0100 |
commit | 46a4208b3db1ea5889be453d04713f627b3a15c8 (patch) | |
tree | a1f17c2a05970829f09be5c6e865f60e4c94ce93 | |
parent | 1d3d713c1ce0a4bd013551a773e255238978831f (diff) | |
download | volse-hubzilla-46a4208b3db1ea5889be453d04713f627b3a15c8.tar.gz volse-hubzilla-46a4208b3db1ea5889be453d04713f627b3a15c8.tar.bz2 volse-hubzilla-46a4208b3db1ea5889be453d04713f627b3a15c8.zip |
don't add pending connections to the default privacy group until accepted
-rw-r--r-- | include/zot.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/include/zot.php b/include/zot.php index 0cfc370a2..333a57c6c 100644 --- a/include/zot.php +++ b/include/zot.php @@ -587,13 +587,16 @@ function zot_refresh($them, $channel = null, $force = false) { // If there is a default group for this channel, add this connection to it - - $default_group = $channel['channel_default_group']; - if($default_group) { - require_once('include/group.php'); - $g = group_rec_byhash($channel['channel_id'],$default_group); - if($g) - group_add_member($channel['channel_id'],'',$x['hash'],$g['id']); + // for pending connections this will happens at acceptance time. + + if(! intval($new_connection[0]['abook_pending'])) { + $default_group = $channel['channel_default_group']; + if($default_group) { + require_once('include/group.php'); + $g = group_rec_byhash($channel['channel_id'],$default_group); + if($g) + group_add_member($channel['channel_id'],'',$x['hash'],$g['id']); + } } unset($new_connection[0]['abook_id']); |