25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

sql_type should be taken for LServer, not LHost (#3202)

sql_type option should be retrieved for the main domain, not the MUC subdomain
This commit is contained in:
Boris Chernov 2020-03-30 10:47:36 +03:00 committed by GitHub
parent 5ec214386e
commit 87dda1b638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,7 +105,7 @@ store(Pkt, LServer, {LUser, LHost}, Type, Peer, Nick, _Dir, TS) ->
jid:tolower(Peer)), jid:tolower(Peer)),
Body = fxml:get_subtag_cdata(Pkt, <<"body">>), Body = fxml:get_subtag_cdata(Pkt, <<"body">>),
SType = misc:atom_to_binary(Type), SType = misc:atom_to_binary(Type),
SqlType = ejabberd_option:sql_type(LHost), SqlType = ejabberd_option:sql_type(LServer),
XML = case mod_mam_opt:compress_xml(LServer) of XML = case mod_mam_opt:compress_xml(LServer) of
true -> true ->
J1 = case Type of J1 = case Type of