add new connection to default group when auto-accepted
This commit is contained in:
parent
7abfe716b4
commit
ef1c01d968
@ -275,7 +275,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
|
|||||||
|
|
||||||
call_hooks('follow', $arr);
|
call_hooks('follow', $arr);
|
||||||
|
|
||||||
/** If there is a default group for this channel, add this member to it */
|
/** If there is a default group for this channel, add this connection to it */
|
||||||
|
|
||||||
if($default_group) {
|
if($default_group) {
|
||||||
require_once('include/group.php');
|
require_once('include/group.php');
|
||||||
|
@ -538,6 +538,16 @@ function zot_refresh($them, $channel = null, $force = false) {
|
|||||||
Zotlabs\Daemon\Master::Summon(array('Onepoll',$new_connection[0]['abook_id']));
|
Zotlabs\Daemon\Master::Summon(array('Onepoll',$new_connection[0]['abook_id']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** 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']);
|
||||||
|
}
|
||||||
|
|
||||||
unset($new_connection[0]['abook_id']);
|
unset($new_connection[0]['abook_id']);
|
||||||
unset($new_connection[0]['abook_account']);
|
unset($new_connection[0]['abook_account']);
|
||||||
unset($new_connection[0]['abook_channel']);
|
unset($new_connection[0]['abook_channel']);
|
||||||
|
Reference in New Issue
Block a user