Software /
code /
prosody-modules
Comparison
mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 3435:26a549513f02
mod_storage_xmlarchive: Remove compat for old argument order
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 06 Jan 2019 10:27:55 +0100 |
parent | 2938:f000ba14d531 |
child | 3452:0c539092aa75 |
comparison
equal
deleted
inserted
replaced
3434:a6722a35f35e | 3435:26a549513f02 |
---|---|
23 local is_stanza = st.is_stanza or function (s) | 23 local is_stanza = st.is_stanza or function (s) |
24 return getmetatable(s) == st.stanza_mt; | 24 return getmetatable(s) == st.stanza_mt; |
25 end | 25 end |
26 | 26 |
27 function archive:append(username, _, data, when, with) | 27 function archive:append(username, _, data, when, with) |
28 if type(when) ~= "number" then | |
29 when, with, data = data, when, with; | |
30 end | |
31 if not is_stanza(data) then | 28 if not is_stanza(data) then |
32 module:log("error", "Attempt to store non-stanza object, traceback: %s", debug.traceback()); | 29 module:log("error", "Attempt to store non-stanza object, traceback: %s", debug.traceback()); |
33 return nil, "unsupported-datatype"; | 30 return nil, "unsupported-datatype"; |
34 end | 31 end |
35 | 32 |