mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
don't add pending connections to the default privacy group until accepted
This commit is contained in:
parent
c462d2f15e
commit
0a876e1518
1 changed files with 9 additions and 6 deletions
|
@ -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
|
||||
// for pending connections this will happens at acceptance time.
|
||||
|
||||
$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']);
|
||||
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']);
|
||||
|
|
Loading…
Reference in a new issue