Let get_all_rooms handle "global" argument, fixes rooms_unsued_... (#3726)

This commit is contained in:
Badlop 2021-12-13 18:22:59 +01:00
parent 8b7da70b57
commit 7e07cba406
1 changed files with 8 additions and 1 deletions

View File

@ -860,7 +860,14 @@ get_online_rooms(ServiceArg) ->
|| {RoomName, RoomHost, Pid} <- mod_muc:get_online_rooms(Host)]
end, Hosts).
get_all_rooms(Host) ->
get_all_rooms(ServiceArg) ->
Hosts = find_services(ServiceArg),
lists:flatmap(
fun(Host) ->
get_all_rooms2(Host)
end, Hosts).
get_all_rooms2(Host) ->
ServerHost = ejabberd_router:host_of_route(Host),
OnlineRooms = get_online_rooms(Host),
OnlineMap = lists:foldl(