mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Prepare user and host arguments in get_user_rooms command (#2064)
This commit is contained in:
parent
b67a114ef5
commit
b2680a776b
@ -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 ->
|
||||
|
Loading…
Reference in New Issue
Block a user