diff options
author | Christophe Romain <christophe.romain@process-one.net> | 2016-02-09 15:33:00 +0100 |
---|---|---|
committer | Christophe Romain <christophe.romain@process-one.net> | 2016-02-09 15:33:00 +0100 |
commit | 583476380ac8c65126c3316fba4e7db2e9c5759b (patch) | |
tree | 0d804148853d0b3d97c44ea1915c7e0f7500ba11 | |
parent | Better presentation of result description in docs (diff) |
Use muc_online_room record for pattern matching
-rw-r--r-- | src/mod_muc_admin.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_muc_admin.erl b/src/mod_muc_admin.erl index c0875737..b8d7c882 100644 --- a/src/mod_muc_admin.erl +++ b/src/mod_muc_admin.erl @@ -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]; |