diff options
author | Kim Alvefur <zash@zash.se> | 2017-04-01 19:04:54 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-04-01 19:04:54 +0200 |
commit | 0f34b6a8ec636101722d584e6597641ab96bf3a0 (patch) | |
tree | 54476d39667e434ad96e85fb6cce408fea1b6fcc /plugins/mod_storage_sql.lua | |
parent | 8a3ee64310ee3ebc5cb91951b166d0ee4f2410c1 (diff) | |
download | prosody-0f34b6a8ec636101722d584e6597641ab96bf3a0.tar.gz prosody-0f34b6a8ec636101722d584e6597641ab96bf3a0.zip |
mod_storage_sql: Sensible defaults for 'when' and 'with' arguments
Diffstat (limited to 'plugins/mod_storage_sql.lua')
-rw-r--r-- | plugins/mod_storage_sql.lua | 2 |
1 files changed, 2 insertions, 0 deletions
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); |