From 3df52777281acf5ddf2e9ab6ea3045324bcdde50 Mon Sep 17 00:00:00 2001 From: Badlop Date: Thu, 26 Nov 2009 14:46:24 +0000 Subject: [PATCH] Move get_group_name outside the loop (thanks to mikekaganski) SVN Revision: 2762 --- src/mod_shared_roster.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod_shared_roster.erl b/src/mod_shared_roster.erl index 4d323b7ee..9d4722163 100644 --- a/src/mod_shared_roster.erl +++ b/src/mod_shared_roster.erl @@ -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))