mod_storage_xmlarchive/mod_storage_xmlarchive.lua
changeset 1764 e72f9eac51c8
parent 1763 0aeab7234d5e
child 1767 cf3ee2eca46d
--- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Thu May 21 11:56:35 2015 +0200
+++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Thu May 21 12:09:47 2015 +0200
@@ -23,9 +23,10 @@
 local archive = {};
 local archive_mt = { __index = archive };
 
+local s = require"util.serialization".new("debug").serialize;
 function archive:append(username, _, data, when, with)
 	if type(when) ~= "number" then
-		data, when, with = when, with, data;
+		when, with, data = data, when, with;
 	end
 	if getmetatable(data) ~= st.stanza_mt then
 		module:log("error", "Attempt to store non-stanza object, traceback: %s", debug.traceback());