mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +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:
parent
afac34de88
commit
9bde1dc9af
@ -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
|
||||
|
@ -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, []}
|
||||
|
Loading…
Reference in New Issue
Block a user