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

Move get_group_name outside the loop (thanks to mikekaganski)

SVN Revision: 2761
This commit is contained in:
Badlop 2009-11-26 14:45:39 +00:00
parent b989297725
commit 71cd4917d8

View File

@ -127,11 +127,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))