25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-30 16:36:29 +01:00

Add missing needdb, use bare jid to get roster; now group and subs blocking works again (thanks to Andreas Köhler)

This commit is contained in:
Badlop 2010-09-17 21:06:30 +02:00
parent afac34de88
commit 9bde1dc9af
2 changed files with 10 additions and 7 deletions

View File

@ -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

View File

@ -1184,14 +1184,14 @@ get_jid_info(_, User, Server, JID)
try
F = fun() ->
LJID = jlib:short_prepd_jid(JID),
case catch gen_storage:read(LServer, {rosteritem, {LUser, LServer, LJID}}) of
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, []}