mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Fix subscribed rooms list retreivement
This commit is contained in:
parent
d222fed228
commit
fe1bf27ef3
@ -720,10 +720,11 @@ get_vh_rooms(Host, #rsm_in{max=M, direction=Direction, id=I, index=Index})->
|
||||
|
||||
get_subscribed_rooms(ServerHost, Host, From) ->
|
||||
Rooms = get_rooms(ServerHost, Host),
|
||||
BareFrom = jid:remove_resource(From),
|
||||
lists:flatmap(
|
||||
fun(#muc_room{name_host = {Name, _}, opts = Opts}) ->
|
||||
Subscribers = proplists:get_value(subscribers, Opts, []),
|
||||
case lists:keymember(From, 1, Subscribers) of
|
||||
case lists:keymember(BareFrom, 1, Subscribers) of
|
||||
true -> [jid:make(Name, Host, <<>>)];
|
||||
false -> []
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user