From ee849338dd1c9238b92ea3dca50a1b6bfd600a30 Mon Sep 17 00:00:00 2001 From: Badlop Date: Thu, 9 Mar 2017 19:21:45 +0100 Subject: Include shared groups also when contact is is personal roster (#1585) --- src/mod_shared_roster.erl | 4 +++- src/mod_shared_roster_ldap.erl | 4 +++- 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, -- cgit v1.2.3