Software /
code /
prosody
Changeset
9839:9007ae90aeb1
Merge 0.11->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 02 Mar 2019 22:26:30 +0100 |
parents | 9837:789395f027f1 (current diff) 9838:40ed04014b97 (diff) |
children | 9844:3de80fc511ab |
files | plugins/mod_storage_memory.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_storage_memory.lua Wed Oct 10 17:22:08 2018 +0200 +++ b/plugins/mod_storage_memory.lua Sat Mar 02 22:26:30 2019 +0100 @@ -3,6 +3,7 @@ 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 @@ 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