Use muc_online_room record for pattern matching

This commit is contained in:
Christophe Romain 2016-02-09 15:33:00 +01:00
parent c0da9b43ce
commit 583476380a
1 changed files with 2 additions and 1 deletions

View File

@ -178,7 +178,8 @@ muc_online_rooms(ServerHost) ->
MUCHost = find_host(ServerHost),
Rooms = ets:tab2list(muc_online_room),
lists:foldl(
fun({_, {Roomname, Host}, _}, Results) ->
fun(Room, Results) ->
{Roomname, Host} = Room#muc_online_room.name_host,
case MUCHost of
global ->
[<<Roomname/binary, "@", Host/binary>> | Results];