diff mod_storage_gdbm/mod_storage_gdbm.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
parents 1fe899527ee5
children c04d10557bbc
line wrap: on
line diff
--- a/mod_storage_gdbm/mod_storage_gdbm.lua	Tue May 19 16:46:20 2015 +0200
+++ b/mod_storage_gdbm/mod_storage_gdbm.lua	Tue May 19 18:34:08 2015 +0200
@@ -73,7 +73,11 @@
 archive.get = keyval.get;
 archive.set = keyval.set;
 
-function archive:append(username, key, when, with, value)
+function archive:append(username, key, value, when, with)
+	if type(when) ~= "number" then
+		value, when, with = when, with, value;
+	end
+
 	key = key or uuid();
 	local meta = self:get(username);
 	if not meta then