aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-03-06 11:39:49 -0800
committerzotlabs <mike@macgirvin.com>2018-03-06 11:39:49 -0800
commit0a876e1518e83636f65b35394076745254db019d (patch)
treea58e9fdd11050da54f58a624e15a8d3f1c7249ea /include/zot.php
parentc462d2f15eb2d463706403676b00bbd7bd111443 (diff)
downloadvolse-hubzilla-0a876e1518e83636f65b35394076745254db019d.tar.gz
volse-hubzilla-0a876e1518e83636f65b35394076745254db019d.tar.bz2
volse-hubzilla-0a876e1518e83636f65b35394076745254db019d.zip
don't add pending connections to the default privacy group until accepted
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/include/zot.php b/include/zot.php
index 25e30ccbc..c11cace2a 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -589,13 +589,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']);