diff options
author | Kim Alvefur <zash@zash.se> | 2019-03-02 22:26:30 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-03-02 22:26:30 +0100 |
commit | 162e8837947005f1be6d129a22f62dcc0de0cae5 (patch) | |
tree | 9c07d3532265be3ddc92f57b06ce6afb2df29a50 /plugins/mod_storage_memory.lua | |
parent | 3d5cb716b4f2dd544f83ce7bd1fee55f3a1ef43f (diff) | |
parent | 258089ed26984350e8981492b30409429e16605b (diff) | |
download | prosody-162e8837947005f1be6d129a22f62dcc0de0cae5.tar.gz prosody-162e8837947005f1be6d129a22f62dcc0de0cae5.zip |
Merge 0.11->trunk
Diffstat (limited to 'plugins/mod_storage_memory.lua')
-rw-r--r-- | plugins/mod_storage_memory.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_storage_memory.lua b/plugins/mod_storage_memory.lua index 5a6ce6bf..745e394b 100644 --- a/plugins/mod_storage_memory.lua +++ b/plugins/mod_storage_memory.lua @@ -3,6 +3,7 @@ local array = require "util.array"; local envload = require "util.envload".envload; local st = require "util.stanza"; local is_stanza = st.is_stanza or function (s) return getmetatable(s) == st.stanza_mt end +local new_id = require "util.id".medium; local auto_purge_enabled = module:get_option_boolean("storage_memory_temporary", false); local auto_purge_stores = module:get_option_set("storage_memory_temporary_stores", {}); @@ -64,7 +65,7 @@ function archive_store:append(username, key, value, when, with) end local v = { key = key, when = when, with = with, value = value }; if not key then - key = tostring(a):match"%x+$"..tostring(v):match"%x+$"; + key = new_id(); v.key = key; end if a[key] then |