aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mod_shared_roster.erl4
-rw-r--r--src/mod_shared_roster_ldap.erl4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/mod_shared_roster.erl b/src/mod_shared_roster.erl
index 8a775cb52..67b5870a2 100644
--- a/src/mod_shared_roster.erl
+++ b/src/mod_shared_roster.erl
@@ -166,10 +166,12 @@ get_user_roster(Items, US) ->
case dict:find(US1,
SRUsers1)
of
- {ok, _GroupNames} ->
+ {ok, GroupNames} ->
{Item#roster{subscription
=
both,
+ groups =
+ Item#roster.groups ++ GroupNames,
ask =
none},
dict:erase(US1,
diff --git a/src/mod_shared_roster_ldap.erl b/src/mod_shared_roster_ldap.erl
index 47ba9f08c..8e6aee0c9 100644
--- a/src/mod_shared_roster_ldap.erl
+++ b/src/mod_shared_roster_ldap.erl
@@ -113,10 +113,12 @@ get_user_roster(Items, {U, S} = US) ->
case dict:find(US1,
SRUsers1)
of
- {ok, _GroupNames} ->
+ {ok, GroupNames} ->
{Item#roster{subscription
=
both,
+ groups =
+ Item#roster.groups ++ GroupNames,
ask =
none},
dict:erase(US1,