aboutsummaryrefslogtreecommitdiffstats
path: root/mod/connections.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-21 17:31:37 -0800
committerfriendica <info@friendica.com>2013-11-21 17:31:37 -0800
commit8cdbd0e2a65cac16a5bad0fca1c3e2e5ec91e348 (patch)
tree950f888e369092a25dc5ec2e1bb6232ec23859c7 /mod/connections.php
parent3e0ac769aad2ae15934c32eef2f4992bde73e178 (diff)
downloadvolse-hubzilla-8cdbd0e2a65cac16a5bad0fca1c3e2e5ec91e348.tar.gz
volse-hubzilla-8cdbd0e2a65cac16a5bad0fca1c3e2e5ec91e348.tar.bz2
volse-hubzilla-8cdbd0e2a65cac16a5bad0fca1c3e2e5ec91e348.zip
make default group for new connections work
Diffstat (limited to 'mod/connections.php')
-rw-r--r--mod/connections.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/mod/connections.php b/mod/connections.php
index a40a8fa90..ba5e8920e 100644
--- a/mod/connections.php
+++ b/mod/connections.php
@@ -129,6 +129,15 @@ function connections_post(&$a) {
}
if($new_friend) {
+ $channel = $a->get_channel();
+ $default_group = $channel['channel_default_group'];
+ if($default_group) {
+ require_once('include/group.php');
+ $g = group_rec_byhash(local_user(),$default_group);
+ if($g)
+ group_add_member(local_user(),'',$a->data['abook_xchan'],$g['id']);
+ }
+
// Check if settings permit ("post new friend activity" is allowed, and
// friends in general or this friend in particular aren't hidden)
// and send out a new friend activity