Comparison

mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 1753:54c8a0cb2996

mod_storage_(archive-capable): Change order of arguments to :append to be the same as return values from :find iterator (see prosody 41725f3df3cc)
author Kim Alvefur <zash@zash.se>
date Tue, 19 May 2015 18:34:08 +0200
parent 1752:3f3689a16133
child 1759:0aeab7234d5e
comparison
equal deleted inserted replaced
1752:3f3689a16133 1753:54c8a0cb2996
21 end); 21 end);
22 22
23 local archive = {}; 23 local archive = {};
24 local archive_mt = { __index = archive }; 24 local archive_mt = { __index = archive };
25 25
26 function archive:append(username, _, when, with, data) 26 function archive:append(username, _, data, when, with)
27 if type(when) ~= "number" then
28 value, when, with = when, with, value;
29 end
27 if getmetatable(data) ~= st.stanza_mt then 30 if getmetatable(data) ~= st.stanza_mt then
28 module:log("error", "Attempt to store non-stanza object, traceback: %s", debug.traceback()); 31 module:log("error", "Attempt to store non-stanza object, traceback: %s", debug.traceback());
29 return nil, "unsupported-datatype"; 32 return nil, "unsupported-datatype";
30 end 33 end
31 34