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

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

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];