]> granicus.if.org Git - ejabberd/commitdiff
Use muc_online_room record for pattern matching
authorChristophe Romain <christophe.romain@process-one.net>
Tue, 9 Feb 2016 14:33:00 +0000 (15:33 +0100)
committerChristophe Romain <christophe.romain@process-one.net>
Tue, 9 Feb 2016 14:33:00 +0000 (15:33 +0100)
src/mod_muc_admin.erl

index c08757375d3a7568ce340bd2a241795e404382f1..b8d7c8828ac6808915f782ce14f62d7e7c961322 100644 (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];