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:
parent
b67a114ef5
commit
b2680a776b
@ -321,13 +321,13 @@ muc_register_nick(Nick, FromBinary, ServerHost) ->
|
|||||||
muc_unregister_nick(FromBinary, ServerHost) ->
|
muc_unregister_nick(FromBinary, ServerHost) ->
|
||||||
muc_register_nick(<<"">>, FromBinary, ServerHost).
|
muc_register_nick(<<"">>, FromBinary, ServerHost).
|
||||||
|
|
||||||
get_user_rooms(LUser, LServer) ->
|
get_user_rooms(User, Server) ->
|
||||||
lists:flatmap(
|
lists:flatmap(
|
||||||
fun(ServerHost) ->
|
fun(ServerHost) ->
|
||||||
case gen_mod:is_loaded(ServerHost, mod_muc) of
|
case gen_mod:is_loaded(ServerHost, mod_muc) of
|
||||||
true ->
|
true ->
|
||||||
Rooms = mod_muc:get_online_rooms_by_user(
|
Rooms = mod_muc:get_online_rooms_by_user(
|
||||||
ServerHost, LUser, LServer),
|
ServerHost, jid:nodeprep(User), jid:nodeprep(Server)),
|
||||||
[<<Name/binary, "@", Host/binary>>
|
[<<Name/binary, "@", Host/binary>>
|
||||||
|| {Name, Host} <- Rooms];
|
|| {Name, Host} <- Rooms];
|
||||||
false ->
|
false ->
|
||||||
|
Loading…
Reference in New Issue
Block a user