Comparison

mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 1759:0aeab7234d5e

Fix for 54c8a0cb2996
author Kim Alvefur <zash@zash.se>
date Thu, 21 May 2015 11:56:35 +0200
parent 1753:54c8a0cb2996
child 1760:e72f9eac51c8
comparison
equal deleted inserted replaced
1758:7ba877e2d660 1759:0aeab7234d5e
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, _, data, when, with) 26 function archive:append(username, _, data, when, with)
27 if type(when) ~= "number" then 27 if type(when) ~= "number" then
28 value, when, with = when, with, value; 28 data, when, with = when, with, data;
29 end 29 end
30 if getmetatable(data) ~= st.stanza_mt then 30 if getmetatable(data) ~= st.stanza_mt then
31 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());
32 return nil, "unsupported-datatype"; 32 return nil, "unsupported-datatype";
33 end 33 end