25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Prepare user and host arguments in get_user_rooms command (#2064)

This commit is contained in:
Badlop 2017-11-17 13:23:27 +01:00
parent b67a114ef5
commit b2680a776b

View File

@ -321,13 +321,13 @@ muc_register_nick(Nick, FromBinary, ServerHost) ->
muc_unregister_nick(FromBinary, ServerHost) ->
muc_register_nick(<<"">>, FromBinary, ServerHost).
get_user_rooms(LUser, LServer) ->
get_user_rooms(User, Server) ->
lists:flatmap(
fun(ServerHost) ->
case gen_mod:is_loaded(ServerHost, mod_muc) of
true ->
Rooms = mod_muc:get_online_rooms_by_user(
ServerHost, LUser, LServer),
ServerHost, jid:nodeprep(User), jid:nodeprep(Server)),
[<<Name/binary, "@", Host/binary>>
|| {Name, Host} <- Rooms];
false ->