summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-09-21 12:16:30 +0200
committerBadlop <badlop@process-one.net>2021-09-22 11:12:28 +0200
commitcfc393a12e3507c9ecb541b8f784c14ff3a9786e (patch)
tree4fab4a2b4c01a64c5549e6d248e9eb7846d0da0f /src
parentFix roster_tests:get_items (diff)
When exporting mod_mam, MUC entries are assigned to the MUC service (#3680)
Diffstat (limited to 'src')
-rw-r--r--src/ejd2sql.erl15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/ejd2sql.erl b/src/ejd2sql.erl
index ad0cc5e8..427e1308 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),