25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-13 15:16:49 +02: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 =
lists:foldl(
fun(Group, Acc1) ->
GroupName = get_group_name(S, Group),
lists:foldl(
fun(User, Acc2) ->
if User == US -> Acc2;
true -> dict:append(User,
get_group_name(S, Group),
GroupName,
Acc2)
end
end, Acc1, get_group_users(S, Group))