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 | b33ad7f001f8242a828e11e9c225346f4aadd81b (patch) | |
tree | 54476d39667e434ad96e85fb6cce408fea1b6fcc /plugins/mod_storage_sql.lua | |
parent | 0e5546ccf1433220ef102f4da71eaa9b1880a074 (diff) | |
download | prosody-b33ad7f001f8242a828e11e9c225346f4aadd81b.tar.gz prosody-b33ad7f001f8242a828e11e9c225346f4aadd81b.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); |