]> granicus.if.org Git - ejabberd/commitdiff
Include shared groups also when contact is is personal roster (#1585)
authorBadlop <badlop@process-one.net>
Thu, 9 Mar 2017 18:21:45 +0000 (19:21 +0100)
committerBadlop <badlop@process-one.net>
Thu, 9 Mar 2017 18:21:45 +0000 (19:21 +0100)
src/mod_shared_roster.erl
src/mod_shared_roster_ldap.erl

index 8a775cb5245679d329d275394252231a08d7a8ca..67b5870a2f62d71aea707cf1e655232274b126e6 100644 (file)
@@ -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,
index 47ba9f08c8f90067336319818c7c9eb5b7ede5a5..8e6aee0c9171b01b297460c738eb22e9bdb71ddf 100644 (file)
@@ -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,