26
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-28 17:38:54 +01:00

Move get_group_name outside the loop (thanks to mikekaganski)

SVN Revision: 2762
This commit is contained in:
Badlop 2009-11-26 14:46:24 +00:00
parent ea4f379bd5
commit 3df5277728

View File

@ -124,11 +124,12 @@ get_user_roster(Items, US) ->
SRUsers = SRUsers =
lists:foldl( lists:foldl(
fun(Group, Acc1) -> fun(Group, Acc1) ->
GroupName = get_group_name(S, Group),
lists:foldl( lists:foldl(
fun(User, Acc2) -> fun(User, Acc2) ->
if User == US -> Acc2; if User == US -> Acc2;
true -> dict:append(User, true -> dict:append(User,
get_group_name(S, Group), GroupName,
Acc2) Acc2)
end end
end, Acc1, get_group_users(S, Group)) end, Acc1, get_group_users(S, Group))