Diff

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
line wrap: on
line diff
--- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Tue May 19 16:46:20 2015 +0200
+++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Tue May 19 18:34:08 2015 +0200
@@ -23,7 +23,10 @@
 local archive = {};
 local archive_mt = { __index = archive };
 
-function archive:append(username, _, when, with, data)
+function archive:append(username, _, data, when, with)
+	if type(when) ~= "number" then
+		value, when, with = when, with, value;
+	end
 	if getmetatable(data) ~= st.stanza_mt then
 		module:log("error", "Attempt to store non-stanza object, traceback: %s", debug.traceback());
 		return nil, "unsupported-datatype";