24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-08 21:43:07 +02:00

Fix problem with handling of old db entries in mod_mam

This commit is contained in:
Paweł Chmielowski 2015-12-09 09:46:45 +01:00
parent 07baf2d973
commit be4d687a86

View File

@ -712,9 +712,10 @@ select(LServer, #jid{luser = LUser} = JidRequestor,
#xmlel{} = El = xml_stream:parse_element(XML), #xmlel{} = El = xml_stream:parse_element(XML),
Now = usec_to_now(jlib:binary_to_integer(TS)), Now = usec_to_now(jlib:binary_to_integer(TS)),
PeerJid = jid:tolower(jid:from_string(PeerBin)), PeerJid = jid:tolower(jid:from_string(PeerBin)),
T = if Kind /= <<"">> -> T = case Kind of
jlib:binary_to_atom(Kind); <<"">> -> chat;
true -> chat null -> chat;
_ -> jlib:binary_to_atom(Kind)
end, end,
{TS, jlib:binary_to_integer(TS), {TS, jlib:binary_to_integer(TS),
msg_to_el(#archive_msg{timestamp = Now, msg_to_el(#archive_msg{timestamp = Now,