From 0f34b6a8ec636101722d584e6597641ab96bf3a0 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 1 Apr 2017 19:04:54 +0200 Subject: mod_storage_sql: Sensible defaults for 'when' and 'with' arguments --- plugins/mod_storage_sql.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index f48c7ae9..122a673a 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -184,6 +184,8 @@ archive_store.caps = { archive_store.__index = archive_store function archive_store:append(username, key, value, when, with) local user,store = username,self.store; + when = when or os.time(); + with = with or ""; local ok, key = engine:transaction(function() if key then engine:delete("DELETE FROM `prosodyarchive` WHERE `host`=? AND `user`=? AND `store`=? AND `key`=?", host, user or "", store, key); -- cgit v1.2.3