diff --git a/src/mod_privacy.erl b/src/mod_privacy.erl index e1b882e72..1b448a2f8 100644 --- a/src/mod_privacy.erl +++ b/src/mod_privacy.erl @@ -418,11 +418,14 @@ process_active_set(LUser, LServer, Name) -> [{'=', user_host, {LUser, LServer}}, {'=', name, Name}]) of [#privacy_list{}] -> - List = gen_storage:select(LServer, privacy_list_data, + Data = gen_storage:select(LServer, privacy_list_data, [{'=', user_host, {LUser, LServer}}, {'=', name, Name}]), + List = list_data_to_items(Data), + NeedDb = is_list_needdb(List), {result, [], #userlist{name = Name, - list = list_data_to_items(List)}}; + needdb = NeedDb, + list = List}}; [] -> {error, 'item-not-found'} end diff --git a/src/mod_roster.erl b/src/mod_roster.erl index a0037151c..573ffb96d 100644 --- a/src/mod_roster.erl +++ b/src/mod_roster.erl @@ -1183,15 +1183,15 @@ get_jid_info(_, User, Server, JID) LServer = exmpp_stringprep:nameprep(Server), try F = fun() -> - LJID = jlib:short_prepd_jid(JID), - case catch gen_storage:read(LServer, {rosteritem, {LUser, LServer, LJID}}) of + LJID = jlib:short_prepd_jid(JID), + LRJID = jlib:short_prepd_bare_jid(JID), + case catch gen_storage:read(LServer, {rosteritem, {LUser, LServer, LRJID}}) of [#rosteritem{subscription = Subscription}] -> Groups = [Group || #rostergroup{grp = Group} <- - gen_storage:read(LServer, {rostergroup, {LUser, LServer, LJID}})], + gen_storage:read(LServer, {rostergroup, {LUser, LServer, LRJID}})], {Subscription, Groups}; _ -> - LRJID = jlib:short_prepd_bare_jid(JID), if LRJID == LJID -> {none, []}; @@ -1202,7 +1202,7 @@ get_jid_info(_, User, Server, JID) [#rosteritem{subscription = Subscription}] -> Groups = [Group || #rostergroup{grp = Group} <- - gen_storage:read(LServer, {rostergroup, {LUser, LServer, LJID}})], + gen_storage:read(LServer, {rostergroup, {LUser, LServer, LRJID}})], {Subscription, Groups}; _ -> {none, []}