aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-15 05:28:16 -0700
committerredmatrix <git@macgirvin.com>2016-06-15 05:30:03 -0700
commitef1c01d968edde6fc880fef6afbf1474bf44c068 (patch)
treef440e73b0a1a8665be4b781d6da5b686ad34a7f6 /include/zot.php
parent7abfe716b47cd6f0171f0304ec07370c16dd595b (diff)
downloadvolse-hubzilla-ef1c01d968edde6fc880fef6afbf1474bf44c068.tar.gz
volse-hubzilla-ef1c01d968edde6fc880fef6afbf1474bf44c068.tar.bz2
volse-hubzilla-ef1c01d968edde6fc880fef6afbf1474bf44c068.zip
add new connection to default group when auto-accepted
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index af79b5723..043139e2f 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -538,6 +538,16 @@ function zot_refresh($them, $channel = null, $force = false) {
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_account']);
unset($new_connection[0]['abook_channel']);