aboutsummaryrefslogtreecommitdiff
path: root/src/ejd2sql.erl
diff options
context:
space:
mode:
authorPouriya <pouriya.jahanbakhsh@gmail.com>2022-01-21 03:14:28 +0330
committerGitHub <noreply@github.com>2022-01-21 03:14:28 +0330
commit03485f5e940326a9fdbcf2ecd1918b2772003a6a (patch)
tree5ce253cdd24e11f0f2bd90babbbf0bc38e38c575 /src/ejd2sql.erl
parentMerge branch 'processone:master' into master (diff)
parentmod_pubsub: Allow for limiting item_expire value (diff)
Merge branch 'processone:master' into master
Diffstat (limited to 'src/ejd2sql.erl')
-rw-r--r--src/ejd2sql.erl15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/ejd2sql.erl b/src/ejd2sql.erl
index ad0cc5e88..427e13087 100644
--- a/src/ejd2sql.erl
+++ b/src/ejd2sql.erl
@@ -73,11 +73,16 @@ export(Server, Output) ->
end, Modules),
close_output(Output, IO).
-export(Server, Output, Module1) ->
- Module = case Module1 of
- mod_pubsub -> pubsub_db;
- _ -> Module1
- end,
+export(Server, Output, mod_mam = M1) ->
+ MucServices = gen_mod:get_module_opt_hosts(Server, mod_muc),
+ [export2(MucService, Output, M1, M1) || MucService <- MucServices],
+ export2(Server, Output, M1, M1);
+export(Server, Output, mod_pubsub = M1) ->
+ export2(Server, Output, M1, pubsub_db);
+export(Server, Output, M1) ->
+ export2(Server, Output, M1, M1).
+
+export2(Server, Output, Module1, Module) ->
SQLMod = gen_mod:db_mod(sql, Module),
LServer = jid:nameprep(iolist_to_binary(Server)),
IO = prepare_output(Output),