aboutsummaryrefslogtreecommitdiff
path: root/src/mod_muc.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_muc.erl')
-rw-r--r--src/mod_muc.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mod_muc.erl b/src/mod_muc.erl
index 366af53d6..c2701fa2b 100644
--- a/src/mod_muc.erl
+++ b/src/mod_muc.erl
@@ -65,7 +65,8 @@
iq_set_register_info/5,
count_online_rooms_by_user/3,
get_online_rooms_by_user/3,
- can_use_nick/4]).
+ can_use_nick/4,
+ get_subscribed_rooms/2]).
-export([init/1, handle_call/3, handle_cast/2,
handle_info/2, terminate/2, code_change/3,
@@ -727,6 +728,11 @@ get_room_disco_item({Name, Host, Pid}, Query) ->
{error, notfound}
end.
+-spec get_subscribed_rooms(binary(), jid()) -> [#muc_subscription{}].
+get_subscribed_rooms(Host, User) ->
+ ServerHost = ejabberd_router:host_of_route(Host),
+ get_subscribed_rooms(ServerHost, Host, User).
+
get_subscribed_rooms(ServerHost, Host, From) ->
LServer = jid:nameprep(ServerHost),
Mod = gen_mod:db_mod(LServer, ?MODULE),