don't add pending connections to the default privacy group until accepted

This commit is contained in:
zotlabs
2018-03-06 11:39:49 -08:00
parent c462d2f15e
commit 0a876e1518

View File

@@ -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 // If there is a default group for this channel, add this connection to it
// for pending connections this will happens at acceptance time.
$default_group = $channel['channel_default_group']; if(! intval($new_connection[0]['abook_pending'])) {
if($default_group) { $default_group = $channel['channel_default_group'];
require_once('include/group.php'); if($default_group) {
$g = group_rec_byhash($channel['channel_id'],$default_group); require_once('include/group.php');
if($g) $g = group_rec_byhash($channel['channel_id'],$default_group);
group_add_member($channel['channel_id'],'',$x['hash'],$g['id']); if($g)
group_add_member($channel['channel_id'],'',$x['hash'],$g['id']);
}
} }
unset($new_connection[0]['abook_id']); unset($new_connection[0]['abook_id']);